Move samba_extended_info_version to smbd/trans2.c
authorVolker Lendecke <vl@samba.org>
Tue, 22 Jan 2008 12:00:22 +0000 (13:00 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 22 Jan 2008 12:00:22 +0000 (13:00 +0100)
This is right now only used there, and in version.c it gave linker errors
because some binaries (e.g. smbmnt) don't link in time.o
(This used to be commit 1f0eaaa5911f893c822465a26fe49ab65afb0730)

source3/include/smb.h
source3/lib/version.c
source3/smbd/trans2.c

index c85920046251f7cee5e680715cfb3112be4fb415..f3cf1db6f8b09fe7d37956babc576d80343a039e 100644 (file)
@@ -1946,6 +1946,5 @@ struct smb_extended_info {
        NTTIME samba_gitcommitdate;
        char   samba_version_string[SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH];
 };
-extern void samba_extended_info_version(struct smb_extended_info *);
 
 #endif /* _SMB_H */
index dff45f62597068dde5d9234529558703f3317f5c..3cae02ad2ee096c2cae125c1b707f1fdcc891e03 100644 (file)
@@ -59,35 +59,3 @@ const char *samba_version_string(void)
        return samba_version;
 #endif
 }
-
-void samba_extended_info_version(struct smb_extended_info *extended_info)
-{
-       assert(extended_info != NULL);
-
-       extended_info->samba_magic = SAMBA_EXTENDED_INFO_MAGIC;
-       extended_info->samba_version = ((SAMBA_VERSION_MAJOR & 0xff) << 24)
-                                      | ((SAMBA_VERSION_MINOR & 0xff) << 16)
-                                      | ((SAMBA_VERSION_RELEASE & 0xff) << 8);
-#ifdef SAMBA_VERSION_REVISION
-       extended_info->samba_version |= (tolower(*SAMBA_VERSION_REVISION) - 'a' + 1) & 0xff;
-#endif
-#ifdef SAMBA_VERSION_RC_RELEASE
-       extended_info->samba_subversion |= (SAMBA_VERSION_RC_RELEASE & 0xff) << 24;
-#else
-#ifdef SAMBA_VERSION_PRE_RELEASE
-       extended_info->samba_subversion |= (SAMBA_VERSION_PRE_RELEASE & 0xff) << 16;
-#endif
-#endif
-#ifdef SAMBA_VERSION_VENDOR_PATCH
-       extended_info->samba_subversion |= (SAMBA_VERSION_VENDOR_PATCH & 0xffff);
-#endif
-       /* FIXME: samba_gitcommitdate should contain the git commit date. */
-       unix_to_nt_time(&extended_info->samba_gitcommitdate, time(NULL));
-
-       memset(extended_info->samba_version_string, 0,
-              sizeof(extended_info->samba_version_string));
-
-       snprintf (extended_info->samba_version_string,
-                 sizeof(extended_info->samba_version_string),
-                 "%s", samba_version_string());
-}
index 1243bdd9d2ebbd7a240ee747de2d519fcc174a88..8b999cd8f54f0991450c00d198b139cdba3147e8 100644 (file)
@@ -2459,6 +2459,38 @@ unsigned char *create_volume_objectid(connection_struct *conn, unsigned char obj
        return objid;
 }
 
+static void samba_extended_info_version(struct smb_extended_info *extended_info)
+{
+       SMB_ASSERT(extended_info != NULL);
+
+       extended_info->samba_magic = SAMBA_EXTENDED_INFO_MAGIC;
+       extended_info->samba_version = ((SAMBA_VERSION_MAJOR & 0xff) << 24)
+                                      | ((SAMBA_VERSION_MINOR & 0xff) << 16)
+                                      | ((SAMBA_VERSION_RELEASE & 0xff) << 8);
+#ifdef SAMBA_VERSION_REVISION
+       extended_info->samba_version |= (tolower(*SAMBA_VERSION_REVISION) - 'a' + 1) & 0xff;
+#endif
+#ifdef SAMBA_VERSION_RC_RELEASE
+       extended_info->samba_subversion |= (SAMBA_VERSION_RC_RELEASE & 0xff) << 24;
+#else
+#ifdef SAMBA_VERSION_PRE_RELEASE
+       extended_info->samba_subversion |= (SAMBA_VERSION_PRE_RELEASE & 0xff) << 16;
+#endif
+#endif
+#ifdef SAMBA_VERSION_VENDOR_PATCH
+       extended_info->samba_subversion |= (SAMBA_VERSION_VENDOR_PATCH & 0xffff);
+#endif
+       /* FIXME: samba_gitcommitdate should contain the git commit date. */
+       unix_to_nt_time(&extended_info->samba_gitcommitdate, time(NULL));
+
+       memset(extended_info->samba_version_string, 0,
+              sizeof(extended_info->samba_version_string));
+
+       snprintf (extended_info->samba_version_string,
+                 sizeof(extended_info->samba_version_string),
+                 "%s", samba_version_string());
+}
+
 /****************************************************************************
  Reply to a TRANS2_QFSINFO (query filesystem info).
 ****************************************************************************/