[DRBD-cvs] user by phil; [patch by LGE] Get names ob block device...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Wed, 9 Jun 2004 16:18:05 +0200 (CEST)
DRBD CVS committal
Author : phil
Project : drbd
Module : user
Dir : drbd/user
Modified Files:
Tag: rel-0_7-branch
drbdadm_adjust.c drbdsetup.c
Log Message:
[patch by LGE] Get names ob block devices from kernel if available.
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/user/Attic/drbdadm_adjust.c,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -u -3 -r1.1.2.14 -r1.1.2.15
--- drbdadm_adjust.c 26 Apr 2004 08:36:29 -0000 1.1.2.14
+++ drbdadm_adjust.c 9 Jun 2004 14:17:59 -0000 1.1.2.15
@@ -224,7 +224,7 @@
goto do_up;
}
- rv=m_fscanf(in,"Lower device: %*02d:%*02d (%[^)])\n",str1);
+ rv=m_fscanf(in,"Lower device: %*3d:%*3d (%[^)])\n",str1);
if( (rv!=1) || strcmp(str1,res->me->disk)) {
do_attach=1;
}
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/user/drbdsetup.c,v
retrieving revision 1.54.2.38
retrieving revision 1.54.2.39
diff -u -3 -r1.54.2.38 -r1.54.2.39
--- drbdsetup.c 1 Jun 2004 14:52:43 -0000 1.54.2.38
+++ drbdsetup.c 9 Jun 2004 14:17:59 -0000 1.54.2.39
@@ -1090,6 +1090,7 @@
printf("Lower device: %02d:%02d (%s)\n",
cn.lower_device_major,
cn.lower_device_minor,
+ cn.lower_device_name[0] ? cn.lower_device_name :
guess_dev_name("/dev",cn.lower_device_major,cn.lower_device_minor));
if( cn.lower_device_major == cn.meta_device_major &&
cn.lower_device_minor == cn.meta_device_minor ) {
@@ -1098,6 +1099,7 @@
printf("Meta device: %02d:%02d (%s)\n",
cn.meta_device_major,
cn.meta_device_minor,
+ cn.meta_device_name[0] ? cn.meta_device_name :
guess_dev_name("/dev",cn.meta_device_major,cn.meta_device_minor));
printf("Meta index: %d\n",cn.meta_index);
}