From: aldot at uclibc.org <aldot@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] svn commit: trunk/buildroot/target/makedevs
Date: Sun, 21 Jan 2007 06:36:25 -0800 (PST) [thread overview]
Message-ID: <20070121143625.01B7548594@busybox.net> (raw)
Author: aldot
Date: 2007-01-21 06:36:25 -0800 (Sun, 21 Jan 2007)
New Revision: 17434
Log:
- use makedev to get device number, else it gives wrong major/minor numbers to devices files on systems which use big device numbers.
Closes #919
Modified:
trunk/buildroot/target/makedevs/makedevs.c
Changeset:
Modified: trunk/buildroot/target/makedevs/makedevs.c
===================================================================
--- trunk/buildroot/target/makedevs/makedevs.c 2007-01-21 12:58:51 UTC (rev 17433)
+++ trunk/buildroot/target/makedevs/makedevs.c 2007-01-21 14:36:25 UTC (rev 17434)
@@ -490,7 +490,7 @@
full_name_inc = xmalloc(strlen(full_name) + 4);
for (i = start; i < count; i++) {
sprintf(full_name_inc, "%s%d", full_name, i);
- rdev = (major << 8) + minor + (i * increment - start);
+ rdev = makedev(major, minor + (i * increment - start));
if (mknod(full_name_inc, mode, rdev) == -1) {
bb_perror_msg("line %d: Couldnt create node %s", linenum, full_name_inc);
ret = EXIT_FAILURE;
@@ -506,7 +506,7 @@
}
free(full_name_inc);
} else {
- rdev = (major << 8) + minor;
+ rdev = makedev(major, minor);
if (mknod(full_name, mode, rdev) == -1) {
bb_perror_msg("line %d: Couldnt create node %s", linenum, full_name);
ret = EXIT_FAILURE;
next reply other threads:[~2007-01-21 14:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-21 14:36 aldot at uclibc.org [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-12-02 22:26 [Buildroot] svn commit: trunk/buildroot/target/makedevs tpetazzoni at uclibc.org
2007-03-20 17:21 aldot at uclibc.org
2006-10-06 12:59 aldot at uclibc.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070121143625.01B7548594@busybox.net \
--to=aldot@uclibc.org \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox