Whamcloud - gitweb
b=9501
authornathan <nathan>
Thu, 27 Oct 2005 23:26:10 +0000 (23:26 +0000)
committernathan <nathan>
Thu, 27 Oct 2005 23:26:10 +0000 (23:26 +0000)
r=adilger
automatically create /dev/lnet, /dev/obd when needed.

lustre/utils/lconf
lustre/utils/obd.c

index 380ada9..f69b313 100755 (executable)
@@ -2118,7 +2118,6 @@ def doHost(lustreDB, hosts):
     
     elif config.write_conf:
         for_each_profile(node_db, prof_list, doModules)
-        sys_make_devices()
         for_each_profile(node_db, prof_list, doWriteconf)
         for_each_profile(node_db, prof_list, doUnloadModules)
         lustreDB.close()
@@ -2155,7 +2154,6 @@ def doHost(lustreDB, hosts):
             for_each_profile(node_db, prof_list, doSetup)
             return
 
-        sys_make_devices()
         sys_set_netmem_max('/proc/sys/net/core/rmem_max', MAXTCPBUF)
         sys_set_netmem_max('/proc/sys/net/core/wmem_max', MAXTCPBUF)
 
@@ -2478,12 +2476,6 @@ def sys_set_netmem_max(path, max):
         fp.write('%d\n' %(max))
         fp.close()
 
-def sys_make_devices():
-    if not os.access('/dev/lnet', os.R_OK):
-        run('mknod /dev/lnet c 10 240')
-    if not os.access('/dev/obd', os.R_OK):
-        run('mknod /dev/obd c 10 241')
-
 
 # Add dir to the global PATH, if not already there.
 def add_to_path(new_dir):
index bb40872..a420fe5 100644 (file)
@@ -2250,7 +2250,8 @@ static void signal_server(int sig)
 int obd_initialize(int argc, char **argv)
 {
         shmem_setup();
-        register_ioc_dev(OBD_DEV_ID, OBD_DEV_PATH);
+        register_ioc_dev(OBD_DEV_ID, OBD_DEV_PATH,
+                         OBD_DEV_MAJOR, OBD_DEV_MINOR);
 
         return 0;
 }