version 1.20, 2006/11/06 19:37:21 |
version 1.21, 2006/11/07 07:16:15 |
|
|
static const char rcsid[] = "$OpenBSD$"; |
static const char rcsid[] = "$OpenBSD$"; |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
|
#include <err.h> |
|
#include <paths.h> |
|
|
#include "tip.h" |
#include "tip.h" |
|
|
static void cuusage(void); |
static void cuusage(void); |
|
|
while ((ch = getopt(argc, argv, "a:l:s:htoe")) != -1) { |
while ((ch = getopt(argc, argv, "a:l:s:htoe")) != -1) { |
switch (ch) { |
switch (ch) { |
case 'a': |
case 'a': |
|
if (optarg[0] == '\0') |
|
errx(3, "invalid acu: \"\""); |
CU = optarg; |
CU = optarg; |
break; |
break; |
case 'l': |
case 'l': |
|
|
if (strchr(optarg, '/')) |
if (strchr(optarg, '/')) |
DV = optarg; |
DV = optarg; |
else |
else |
asprintf(&DV, "/dev/%s", optarg); |
if (asprintf(&DV, "%s%s", _PATH_DEV, optarg) == -1) |
|
err(3, "asprintf"); |
break; |
break; |
case 's': |
case 's': |
BR = (int)strtonum(optarg, 0, INT_MAX, &errstr); |
BR = (int)strtonum(optarg, 0, INT_MAX, &errstr); |