Another small patch for guess_dev_name in user/drbdsetup.c (0.7 branch)
Hi,
guess_dev_name can exit early if the major/minor pair passed in is 0,0 as this is not a real device so we won't find it in /dev. This skips recursing over /dev and stat-ing every file.
Attached patch fixes this.
Regards,
Iustin Pop
drbdsetup.c +3 -0
@@ -1220,6 +1220,9 @@struct stat sb;static char dev_name[50 ]; +if (major==0 && minor==0 ) +return NULL ; + device_dir=opendir (dir);if (!device_dir) goto err_out;
Philipp Reisner
maintainerAm Dienstag, 9. Januar 2007 10:37 schrieb Iustin Pop:
Quoted 6 lines
Hi,
guess_dev_namecan exit early if the major/minor pair passed in is 0,0 as this is not a real device so we won't find it in /dev. This skips recursing over /dev and stat-ing every file.
Hi Iustin,
Finally your patches found their way to SVN ;)
http://lists.linbit.com/pipermail/drbd-cvs/2007-February/001466.html
-Phil
Signature · 3 lines
: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 : : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : : Vivenotgasse 48, 1120 Vienna, Austria http://www.linbit.com :