diff options
author | Adrian Chadd <adrian@FreeBSD.org> | 2000-11-09 09:03:19 +0000 |
---|---|---|
committer | Adrian Chadd <adrian@FreeBSD.org> | 2000-11-09 09:03:19 +0000 |
commit | 9934b00e8466b567a1f526b46cc887cc1132161d (patch) | |
tree | 7de814443f724599300bd16f6959a21a5a323805 /sbin/badsect | |
parent | 806d7daafe9953ef3f37c1ced4f10e9fb7ec6f31 (diff) | |
download | src-9934b00e8466b567a1f526b46cc887cc1132161d.tar.gz src-9934b00e8466b567a1f526b46cc887cc1132161d.zip |
Remove the block/char device distinction. badsect only worked on bdevs,
and then mapped /dev/foo into /dev/rfoo to get to the character device.
This isn't needed anymore.
Reviewed by: ps
Notes
Notes:
svn path=/head/; revision=68521
Diffstat (limited to 'sbin/badsect')
-rw-r--r-- | sbin/badsect/badsect.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sbin/badsect/badsect.c b/sbin/badsect/badsect.c index 7ecf1863735d..c6972b859ee8 100644 --- a/sbin/badsect/badsect.c +++ b/sbin/badsect/badsect.c @@ -122,7 +122,7 @@ main(argc, argv) if (lstat(name, &devstat) < 0) err(4, "%s", name); if (stbuf.st_dev == devstat.st_rdev && - (devstat.st_mode & IFMT) == IFBLK) + (devstat.st_mode & IFMT) == IFCHR) break; } closedir(dirp); @@ -131,12 +131,6 @@ main(argc, argv) (u_long)stbuf.st_rdev, argv[1]); exit(5); } - /* - * Opening of a mounted on device is not allowed. - * Attempt to open the raw device instead. - */ - memcpy(name_dir_end + 1, name_dir_end, strlen(name_dir_end) + 1); - *name_dir_end = 'r'; if ((fsi = open(name, O_RDONLY)) < 0) err(6, "%s", name); fs = &sblock; |