Whamcloud - gitweb
LU-7699 build: Eliminate lustre_build_version.h
[fs/lustre-release.git] / lustre / obdclass / class_obd.c
index b742b51..91e3371 100644 (file)
@@ -47,7 +47,7 @@
 #include <lnet/lnetctl.h>
 #include <lustre_debug.h>
 #include <lprocfs_status.h>
-#include <lustre/lustre_build_version.h>
+#include <lustre_ver.h>
 #include <libcfs/list.h>
 #include <cl_object.h>
 #ifdef HAVE_SERVER_SUPPORT
@@ -255,24 +255,24 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
                 GOTO(out, err);
         }
 
-        case OBD_GET_VERSION:
-                if (!data->ioc_inlbuf1) {
-                        CERROR("No buffer passed in ioctl\n");
-                        GOTO(out, err = -EINVAL);
-                }
+       case OBD_GET_VERSION:
+               if (!data->ioc_inlbuf1) {
+                       CERROR("No buffer passed in ioctl\n");
+                       GOTO(out, err = -EINVAL);
+               }
 
-                if (strlen(BUILD_VERSION) + 1 > data->ioc_inllen1) {
-                        CERROR("ioctl buffer too small to hold version\n");
-                        GOTO(out, err = -EINVAL);
-                }
+               if (strlen(LUSTRE_VERSION_STRING) + 1 > data->ioc_inllen1) {
+                       CERROR("ioctl buffer too small to hold version\n");
+                       GOTO(out, err = -EINVAL);
+               }
 
-                memcpy(data->ioc_bulk, BUILD_VERSION,
-                       strlen(BUILD_VERSION) + 1);
+               memcpy(data->ioc_bulk, LUSTRE_VERSION_STRING,
+                      strlen(LUSTRE_VERSION_STRING) + 1);
 
                err = obd_ioctl_popdata((void __user *)arg, data, len);
-                if (err)
-                        err = -EFAULT;
-                GOTO(out, err);
+               if (err)
+                       err = -EFAULT;
+               GOTO(out, err);
 
         case OBD_IOC_NAME2DEV: {
                 /* Resolve a device name.  This does not change the
@@ -500,7 +500,7 @@ static int __init obdclass_init(void)
        INIT_LIST_HEAD(&obd_stale_exports);
        atomic_set(&obd_stale_export_num, 0);
 
-       LCONSOLE_INFO("Lustre: Build Version: "BUILD_VERSION"\n");
+       LCONSOLE_INFO("Lustre: Build Version: "LUSTRE_VERSION_STRING"\n");
 
        spin_lock_init(&obd_types_lock);
        obd_zombie_impexp_init();