Date: Tue, 31 Jul 2007 19:59:50 GMT From: Ulf Lilleengen <lulf@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 124435 for review Message-ID: <200707311959.l6VJxorH089145@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=124435 Change 124435 by lulf@lulf_carrot on 2007/07/31 19:59:35 - Run a loop with a small sleep instead of a "static" sleep count. Noted by: pjd@ Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sbin/gvinum/gvinum.c#16 edit Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sbin/gvinum/gvinum.c#16 (text+ko) ==== @@ -430,10 +430,14 @@ gctl_ro_param(req, "plexes", sizeof(int), &plexes); gctl_ro_param(req, "subdisks", sizeof(int), &subdisks); errstr = gctl_issue(req); - sleep(2); /* Wait for events to be executed. XXX: not very nice... but - we won't have to modify event system for just his issue. */ - if (errstr != NULL) + if (errstr != NULL) { warnx("error creating drive: %s", errstr); + gctl_free(req); + free(drivename); + usleep(100000); /* sleep for 0.1s. */ + printf("retrying...\n"); + return (create_drive(device)); + } gctl_free(req); return (drivename); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707311959.l6VJxorH089145>