From: kuebelr@email.uc.edu
To: linux-kernel@vger.kernel.org
Subject: [PATCH] do_mounts.c - compiler warning, comments, cramfs
Date: Sat, 8 Jun 2002 15:56:10 -0400 [thread overview]
Message-ID: <20020608195610.GA21632@cartman> (raw)
This patch tweaks a few things in do_mounts.c:
-change_floppy() is defined but not used if neither CONFIG_BLK_DEV_RAM
or CONFIG_BLK_DEV_FD are defined
-since the gzip code is already in the kernel, why not do away w/ the
BUILD_CRAMDISK stuff and always support compressed images
-one incorrect comment changed
-one repeated NOTE removed
If no one yells at me for this, I will submit it to the patch monkey.
Rob.
--- linux-clean/init/do_mounts.c Fri Jun 7 23:42:15 2002
+++ linux-dirty/init/do_mounts.c Sat Jun 8 15:38:52 2002
@@ -16,8 +16,6 @@
#include <linux/ext2_fs.h>
#include <linux/romfs_fs.h>
-#define BUILD_CRAMDISK
-
extern int get_filesystem_list(char * buf);
asmlinkage long sys_mount(char *dev_name, char *dir_name, char *type,
@@ -378,6 +376,7 @@
return sys_symlink(path + n + 5, name);
}
+#if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_RAM)
static void __init change_floppy(char *fmt, ...)
{
struct termios termios;
@@ -405,6 +404,7 @@
close(fd);
}
}
+#endif /* CONFIG_BLK_DEV_FD || CONFIG_BLK_DEV_RAM */
#ifdef CONFIG_BLK_DEV_RAM
@@ -466,7 +466,7 @@
read(fd, buf, size);
/*
- * If it matches the gzip magic numbers, return -1
+ * If it matches the gzip magic numbers, return 0
*/
if (buf[0] == 037 && ((buf[1] == 0213) || (buf[1] == 0236))) {
printk(KERN_NOTICE
@@ -548,19 +548,13 @@
goto done;
if (nblocks == 0) {
-#ifdef BUILD_CRAMDISK
if (crd_load(in_fd, out_fd) == 0)
goto successful_load;
-#else
- printk(KERN_NOTICE
- "RAMDISK: Kernel does not support compressed "
- "RAM disk images\n");
-#endif
goto done;
}
/*
- * NOTE NOTE: nblocks suppose that the blocksize is BLOCK_SIZE, so
+ * NOTE: nblocks suppose that the blocksize is BLOCK_SIZE, so
* rd_load_image will work only with filesystem BLOCK_SIZE wide!
* So make sure to use 1k blocksize while generating ext2fs
* ramdisk-images.
@@ -860,7 +854,7 @@
mount_devfs_fs ();
}
-#ifdef BUILD_CRAMDISK
+#ifdef CONFIG_BLK_DEV_RAM
/*
* gzip declarations
@@ -1005,4 +999,4 @@
return result;
}
-#endif /* BUILD_CRAMDISK */
+#endif /* CONFIG_BLK_DEV_RAM */
reply other threads:[~2002-06-08 19:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020608195610.GA21632@cartman \
--to=kuebelr@email.uc.edu \
--cc=linux-kernel@vger.kernel.org \
/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