]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Perform some cleanups to devname(3).
authorEd Schouten <ed@FreeBSD.org>
Sun, 31 Jan 2010 14:51:04 +0000 (14:51 +0000)
committerEd Schouten <ed@FreeBSD.org>
Sun, 31 Jan 2010 14:51:04 +0000 (14:51 +0000)
commit49e5c8f314d7a068ad45d0602ec62cf666b30dc8
tree64e48d4e4e23ffdcb956c8f7e2e4959c00556549
parentb3e7ca23e791a41658f433cf02303024db6de91c
Perform some cleanups to devname(3).

- Make sure the mode argument is either a character or a block device.
- Use S_IS*() instead of checking S_IF*-flags by hand.
- Don't use kern.devname when the argument is already NODEV.
- Always call snprintf with the proper amount of arguments corresponding
  with the format.
- Perform some whitespace fixes. Tabs instead of 4 spaces, missing space
  for return statement.
- Remove unneeded includes.
lib/libc/gen/devname.c