aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/fdformat/fdformat.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-08-20 15:14:25 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-08-20 15:14:25 +0000
commit1b67be7b750ed0f074d730bf1164a82fe1bcf83b (patch)
treeb948c22d12f559b0c58f576fc7da5d69acc1c8ef /usr.sbin/fdformat/fdformat.c
parent0f81131e63eb10706519803242117a8a09dff5c4 (diff)
Notes
Diffstat (limited to 'usr.sbin/fdformat/fdformat.c')
-rw-r--r--usr.sbin/fdformat/fdformat.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.sbin/fdformat/fdformat.c b/usr.sbin/fdformat/fdformat.c
index dd92a86a5077..8e29e40fc857 100644
--- a/usr.sbin/fdformat/fdformat.c
+++ b/usr.sbin/fdformat/fdformat.c
@@ -268,13 +268,8 @@ main(int argc, char **argv)
parse_fmt(fmtstring, type, fdt, &newft);
fdt = newft;
}
- if (fdopts & FDOPT_AUTOSEL) {
- if (ioctl(fd, FD_STYPE, &fdt) < 0)
- err(EX_OSERR, "ioctl(FD_STYPE)");
- } else if (fmtstring || format) {
- errx(EX_USAGE,
- "-f fmt or -s fmtstr is only allowed for autoselecting devices");
- }
+ if (ioctl(fd, FD_STYPE, &fdt) < 0)
+ err(EX_OSERR, "ioctl(FD_STYPE)");
if ((flags = fcntl(fd, F_GETFL, 0)) == -1)
err(EX_OSERR, "fcntl(F_GETFL)");
flags &= ~O_NONBLOCK;