<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/gen/devname.c, branch upstream/11.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>libc: do not include &lt;sys/types.h&gt; where &lt;sys/param.h&gt; was already included</title>
<updated>2016-04-18T21:05:15+00:00</updated>
<author>
<name>Andriy Voskoboinyk</name>
<email>avos@FreeBSD.org</email>
</author>
<published>2016-04-18T21:05:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2cf5e9365d299ad70ec7fe8a7e7202fbb925e70c'/>
<id>2cf5e9365d299ad70ec7fe8a7e7202fbb925e70c</id>
<content type='text'>
According to style(9):
&gt; normally, include &lt;sys/types.h&gt; OR &lt;sys/param.h&gt;, but not both.
(&lt;sys/param.h&gt; already includes &lt;sys/types.h&gt; when LOCORE is not defined).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to style(9):
&gt; normally, include &lt;sys/types.h&gt; OR &lt;sys/param.h&gt;, but not both.
(&lt;sys/param.h&gt; already includes &lt;sys/types.h&gt; when LOCORE is not defined).
</pre>
</div>
</content>
</entry>
<entry>
<title>Include stdlib.h to get devname() prototype.</title>
<updated>2015-08-31T19:40:54+00:00</updated>
<author>
<name>Craig Rodrigues</name>
<email>rodrigc@FreeBSD.org</email>
</author>
<published>2015-08-31T19:40:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=695ba2f98acdf519f3a70f4e933dafdfb197bf7d'/>
<id>695ba2f98acdf519f3a70f4e933dafdfb197bf7d</id>
<content type='text'>
Eliminates -Wmissing-prototypes warnings with gcc
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Eliminates -Wmissing-prototypes warnings with gcc
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of major/minor number distinction.</title>
<updated>2011-09-28T18:53:36+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2011-09-28T18:53:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9f365aa1d6aab0aca269b54fb5d216ac0e31a06f'/>
<id>9f365aa1d6aab0aca269b54fb5d216ac0e31a06f</id>
<content type='text'>
As of FreeBSD 6, devices can only be opened through devfs. These device
nodes don't have major and minor numbers anymore. The st_rdev field in
struct stat is simply based a copy of st_ino.

Simply display device numbers as hexadecimal, using "%#jx". This is
allowed by POSIX, since it explicitly states things like the following
(example taken from ls(1)):

	"If the file is a character special or block special file, the
	size of the file may be replaced with implementation-defined
	information associated with the device in question."

This makes the output of these commands more compact. For example, ls(1)
now uses approximately four columns less. While there, simplify the
column length calculation from ls(1) by calling snprintf() with a NULL
buffer.

Don't be afraid; if needed one can still obtain individual major/minor
numbers using stat(1).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As of FreeBSD 6, devices can only be opened through devfs. These device
nodes don't have major and minor numbers anymore. The st_rdev field in
struct stat is simply based a copy of st_ino.

Simply display device numbers as hexadecimal, using "%#jx". This is
allowed by POSIX, since it explicitly states things like the following
(example taken from ls(1)):

	"If the file is a character special or block special file, the
	size of the file may be replaced with implementation-defined
	information associated with the device in question."

This makes the output of these commands more compact. For example, ls(1)
now uses approximately four columns less. While there, simplify the
column length calculation from ls(1) by calling snprintf() with a NULL
buffer.

Don't be afraid; if needed one can still obtain individual major/minor
numbers using stat(1).
</pre>
</div>
</content>
</entry>
<entry>
<title>Perform some cleanups to devname(3).</title>
<updated>2010-01-31T14:51:04+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2010-01-31T14:51:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=49e5c8f314d7a068ad45d0602ec62cf666b30dc8'/>
<id>49e5c8f314d7a068ad45d0602ec62cf666b30dc8</id>
<content type='text'>
- 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Per Regents of the University of Calfornia letter, remove advertising</title>
<updated>2007-01-09T00:28:16+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2007-01-09T00:28:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c879ae3536e6d92b8d96c8965c5b05fcb9541520'/>
<id>c879ae3536e6d92b8d96c8965c5b05fcb9541520</id>
<content type='text'>
clause.

# If I've done so improperly on a file, please let me know.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clause.

# If I've done so improperly on a file, please let me know.
</pre>
</div>
</content>
</entry>
<entry>
<title>Include a couple of headers to ensure consistency between the prototype and</title>
<updated>2005-09-12T19:52:42+00:00</updated>
<author>
<name>Stefan Farfeleder</name>
<email>stefanf@FreeBSD.org</email>
</author>
<published>2005-09-12T19:52:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=613100918de03164200eb28f7db1a2b1d701a697'/>
<id>613100918de03164200eb28f7db1a2b1d701a697</id>
<content type='text'>
the function definition.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the function definition.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add devname_r(3) which takes a buffer as argument.</title>
<updated>2003-06-20T09:52:27+00:00</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2003-06-20T09:52:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=529ac58781315d051c9cd091fb023da1ad40eb01'/>
<id>529ac58781315d051c9cd091fb023da1ad40eb01</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Recognize the magic NODEV value.</title>
<updated>2003-06-05T21:55:57+00:00</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2003-06-05T21:55:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c6dd496cd9571118a6f47dbebd12549148ae2906'/>
<id>c6dd496cd9571118a6f47dbebd12549148ae2906</id>
<content type='text'>
Format other unknown devices consistently in hex.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Format other unknown devices consistently in hex.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix SCM ID's.</title>
<updated>2002-02-01T00:57:29+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2002-02-01T00:57:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ea8d448a923f0d68d7ecf1d2a0583c7d17bdee4e'/>
<id>ea8d448a923f0d68d7ecf1d2a0583c7d17bdee4e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct the old length argument passed to sysctlbyname to be a pointer</title>
<updated>2001-07-29T22:01:55+00:00</updated>
<author>
<name>Thomas Moestl</name>
<email>tmm@FreeBSD.org</email>
</author>
<published>2001-07-29T22:01:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d35bce02eecb44630fc3932f712fa2c0b998af9e'/>
<id>d35bce02eecb44630fc3932f712fa2c0b998af9e</id>
<content type='text'>
to a size_t (not to an int).

MFC after:	2 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to a size_t (not to an int).

MFC after:	2 days
</pre>
</div>
</content>
</entry>
</feed>
