linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] init: Export name_to_dev_t and mark it const
@ 2015-02-10 23:20 Dan Ehrenberg
  2015-02-10 23:20 ` [PATCH v2 2/3] init: Stricter checking of major:minor root= values Dan Ehrenberg
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dan Ehrenberg @ 2015-02-10 23:20 UTC (permalink / raw)
  To: viro, snitzer, agk
  Cc: grundler, gwendal, dm-devel, linux-kernel, ebiederm,
	Dan Ehrenberg

name_to_dev_t is useful in other pieces of code to initialize rootfs.
In the case of dm, the code is sometimes built in a module and other
times used to construct the rootfs; therefore it must be exported
as a symbol.

Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
---
 include/linux/mount.h | 2 +-
 init/do_mounts.c      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/mount.h b/include/linux/mount.h
index c2c561d..bca086d 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -92,6 +92,6 @@ extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
 extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list);
 extern void mark_mounts_for_expiry(struct list_head *mounts);
 
-extern dev_t name_to_dev_t(char *name);
+extern dev_t name_to_dev_t(const char *name);
 
 #endif /* _LINUX_MOUNT_H */
diff --git a/init/do_mounts.c b/init/do_mounts.c
index eb41008..4b2daf1 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -207,7 +207,7 @@ done:
  *	bangs.
  */
 
-dev_t name_to_dev_t(char *name)
+dev_t name_to_dev_t(const char *name)
 {
 	char s[32];
 	char *p;
@@ -286,6 +286,7 @@ fail:
 done:
 	return res;
 }
+EXPORT_SYMBOL(name_to_dev_t);
 
 static int __init root_dev_setup(char *line)
 {
-- 
2.2.0.rc0.207.ga3a616c


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH v2 1/3] init: Export name_to_dev_t and mark it const
@ 2015-02-10 23:20 Dan Ehrenberg
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Ehrenberg @ 2015-02-10 23:20 UTC (permalink / raw)
  To: viro, snitzer, agk
  Cc: grundler, gwendal, dm-devel, linux-kernel, ebiederm,
	Dan Ehrenberg

name_to_dev_t is useful in other pieces of code to initialize rootfs.
In the case of dm, the code is sometimes built in a module and other
times used to construct the rootfs; therefore it must be exported
as a symbol.

Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
---
 include/linux/mount.h | 2 +-
 init/do_mounts.c      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/mount.h b/include/linux/mount.h
index c2c561d..bca086d 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -92,6 +92,6 @@ extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
 extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list);
 extern void mark_mounts_for_expiry(struct list_head *mounts);
 
-extern dev_t name_to_dev_t(char *name);
+extern dev_t name_to_dev_t(const char *name);
 
 #endif /* _LINUX_MOUNT_H */
diff --git a/init/do_mounts.c b/init/do_mounts.c
index eb41008..4b2daf1 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -207,7 +207,7 @@ done:
  *	bangs.
  */
 
-dev_t name_to_dev_t(char *name)
+dev_t name_to_dev_t(const char *name)
 {
 	char s[32];
 	char *p;
@@ -286,6 +286,7 @@ fail:
 done:
 	return res;
 }
+EXPORT_SYMBOL(name_to_dev_t);
 
 static int __init root_dev_setup(char *line)
 {
-- 
2.2.0.rc0.207.ga3a616c


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-18 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10 23:20 [PATCH v2 1/3] init: Export name_to_dev_t and mark it const Dan Ehrenberg
2015-02-10 23:20 ` [PATCH v2 2/3] init: Stricter checking of major:minor root= values Dan Ehrenberg
2015-02-10 23:20 ` [PATCH v2 3/3] dm: Get devices using name_to_dev_t Dan Ehrenberg
2015-03-18 21:28 ` [PATCH v2 1/3] init: Export name_to_dev_t and mark it const Mike Snitzer
  -- strict thread matches above, loose matches on Subject: below --
2015-02-10 23:20 Dan Ehrenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).