mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] new system call mknod64
Date: Sun, 20 Apr 2003 20:39:32 +0200 (MEST)	[thread overview]
Message-ID: <UTC200304201839.h3KIdWk18226.aeb@smtp.cwi.nl> (raw)

Change the type of the mknod arg from dev_t to unsigned int.
Add (for i386) mknod64.

diff -u --recursive --new-file -X /linux/dontdiff a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
--- a/arch/i386/kernel/entry.S	Tue Mar 25 04:54:29 2003
+++ b/arch/i386/kernel/entry.S	Sun Apr 20 19:13:34 2003
@@ -852,6 +852,7 @@
  	.long sys_clock_gettime		/* 265 */
  	.long sys_clock_getres
  	.long sys_clock_nanosleep
+	.long sys_mknod64
  
  
 nr_syscalls=(.-sys_call_table)/4
diff -u --recursive --new-file -X /linux/dontdiff a/fs/namei.c b/fs/namei.c
--- a/fs/namei.c	Sun Apr 20 12:59:32 2003
+++ b/fs/namei.c	Sun Apr 20 19:13:34 2003
@@ -1403,11 +1403,12 @@
 	return error;
 }
 
-asmlinkage long sys_mknod(const char __user * filename, int mode, dev_t dev)
+static long
+do_mknod(const char __user *filename, int mode, dev_t dev)
 {
 	int error = 0;
-	char * tmp;
-	struct dentry * dentry;
+	char *tmp;
+	struct dentry *dentry;
 	struct nameidata nd;
 
 	if (S_ISDIR(mode))
@@ -1448,6 +1449,19 @@
 	return error;
 }
 
+asmlinkage long
+sys_mknod(const char __user *filename, int mode, unsigned int dev)
+{
+	return do_mknod(filename, mode, dev);
+}
+
+asmlinkage long
+sys_mknod64(const char __user *filename, int mode,
+	    unsigned int devhi, unsigned int devlo)
+{
+	return do_mknod(filename, mode, ((u64) devhi << 32) + devlo);
+}
+
 int vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 {
 	int error = may_create(dir, dentry);
@@ -2140,8 +2154,8 @@
 {
 	struct page * page;
 	struct address_space *mapping = dentry->d_inode->i_mapping;
-	page = read_cache_page(mapping, 0, (filler_t *)mapping->a_ops->readpage,
-				NULL);
+	page = read_cache_page(mapping, 0,
+			       (filler_t *)mapping->a_ops->readpage, NULL);
 	if (IS_ERR(page))
 		goto sync_fail;
 	wait_on_page_locked(page);
diff -u --recursive --new-file -X /linux/dontdiff a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
--- a/include/asm-i386/unistd.h	Mon Feb 24 23:02:56 2003
+++ b/include/asm-i386/unistd.h	Sun Apr 20 19:13:34 2003
@@ -273,8 +273,9 @@
 #define __NR_clock_gettime	(__NR_timer_create+6)
 #define __NR_clock_getres	(__NR_timer_create+7)
 #define __NR_clock_nanosleep	(__NR_timer_create+8)
+#define __NR_sys_mknod64	268
 
-#define NR_syscalls 268
+#define NR_syscalls 269
 
 /* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
 

             reply	other threads:[~2003-04-20 18:27 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-20 18:39 Andries.Brouwer [this message]
2003-04-20 18:52 ` Christoph Hellwig
2003-04-20 20:34 Andries.Brouwer
2003-04-20 21:12 ` David S. Miller
2003-04-20 21:26 Andries.Brouwer
2003-04-20 21:43 ` David S. Miller
2003-04-20 21:56   ` Linus Torvalds
2003-04-21 11:59     ` Roman Zippel
2003-04-21 18:01       ` Linus Torvalds
2003-04-21 18:10         ` Christoph Hellwig
2003-04-21 18:21           ` viro
2003-04-21 18:22           ` Linus Torvalds
2003-04-21 18:27             ` viro
2003-04-21 18:35               ` Linus Torvalds
2003-04-21 18:54                 ` viro
2003-04-21 19:16                   ` Jörn Engel
2003-04-21 18:35             ` Christoph Hellwig
2003-04-21 18:42               ` H. Peter Anvin
2003-04-21 18:44               ` Linus Torvalds
2003-04-21 18:47                 ` Christoph Hellwig
2003-04-21 18:58                   ` viro
2003-04-21 19:05                     ` Linus Torvalds
2003-04-21 19:35                       ` viro
2003-04-21 20:02                         ` Linus Torvalds
2003-04-21 19:04                   ` Linus Torvalds
2003-04-21 19:59                     ` H. Peter Anvin
2003-04-21 18:51                 ` H. Peter Anvin
2003-04-21 23:49             ` Roman Zippel
2003-04-20 22:12 Andries.Brouwer
2003-04-21  6:31 ` H. Peter Anvin
2003-04-21 21:43 Andries.Brouwer
2003-04-21 23:02 ` H. Peter Anvin
2003-04-21 23:50   ` Jamie Lokier
2003-04-22  8:24     ` Shachar Shemesh
2003-04-21 21:48 Andries.Brouwer
2003-04-21 22:07 ` Linus Torvalds
2003-04-22  1:02 Andries.Brouwer
2003-04-22  1:32 ` H. Peter Anvin
2003-04-22  2:01   ` Jamie Lokier
2003-04-22  2:52     ` H. Peter Anvin
2003-04-22  6:00       ` jw schultz
2003-04-22 17:17         ` H. Peter Anvin
     [not found] <20030421215009$2052@gated-at.bofh.it>
     [not found] ` <20030421231010$7ee3@gated-at.bofh.it>
     [not found]   ` <20030422000016$17e3@gated-at.bofh.it>
     [not found]     ` <20030422083014$0fe2@gated-at.bofh.it>
2003-04-22 20:02       ` Arnd Bergmann

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=UTC200304201839.h3KIdWk18226.aeb@smtp.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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

all inboxes | Powered by JetHome®