diff options
author | Jens Axboe <jaxboe@fusionio.com> | 2010-09-17 04:00:46 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-09-17 04:00:46 -0400 |
commit | 6d0aed7a38d06284db2a0e46c0a072b0c1c3299b (patch) | |
tree | f0c59524517fdd0ab384ac65c60bed305ebc77c8 /init/do_mounts.c | |
parent | 01ea50638bc04ca5259f5711fcdedefcdde1cf43 (diff) |
do_mounts: only enable PARTUUID for CONFIG_BLOCK
When CONFIG_BLOCK is not enabled:
init/do_mounts.c:71: error: implicit declaration of function 'dev_to_part'
init/do_mounts.c:71: warning: initialization makes pointer from integer without a cast
init/do_mounts.c:73: error: dereferencing pointer to incomplete type
init/do_mounts.c:76: error: dereferencing pointer to incomplete type
init/do_mounts.c:76: error: dereferencing pointer to incomplete type
init/do_mounts.c:102: error: implicit declaration of function 'part_pack_uuid'
init/do_mounts.c:104: error: 'block_class' undeclared (first use in this function)
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r-- | init/do_mounts.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c index b7fc83994f39..42db0551c3aa 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -58,6 +58,7 @@ static int __init readwrite(char *str) | |||
58 | __setup("ro", readonly); | 58 | __setup("ro", readonly); |
59 | __setup("rw", readwrite); | 59 | __setup("rw", readwrite); |
60 | 60 | ||
61 | #ifdef CONFIG_BLOCK | ||
61 | /** | 62 | /** |
62 | * match_dev_by_uuid - callback for finding a partition using its uuid | 63 | * match_dev_by_uuid - callback for finding a partition using its uuid |
63 | * @dev: device passed in by the caller | 64 | * @dev: device passed in by the caller |
@@ -111,6 +112,7 @@ static dev_t __init devt_from_partuuid(char *uuid_str) | |||
111 | done: | 112 | done: |
112 | return res; | 113 | return res; |
113 | } | 114 | } |
115 | #endif | ||
114 | 116 | ||
115 | /* | 117 | /* |
116 | * Convert a name into device number. We accept the following variants: | 118 | * Convert a name into device number. We accept the following variants: |
@@ -138,6 +140,7 @@ dev_t name_to_dev_t(char *name) | |||
138 | dev_t res = 0; | 140 | dev_t res = 0; |
139 | int part; | 141 | int part; |
140 | 142 | ||
143 | #ifdef CONFIG_BLOCK | ||
141 | if (strncmp(name, "PARTUUID=", 9) == 0) { | 144 | if (strncmp(name, "PARTUUID=", 9) == 0) { |
142 | name += 9; | 145 | name += 9; |
143 | if (strlen(name) != 36) | 146 | if (strlen(name) != 36) |
@@ -147,6 +150,7 @@ dev_t name_to_dev_t(char *name) | |||
147 | goto fail; | 150 | goto fail; |
148 | goto done; | 151 | goto done; |
149 | } | 152 | } |
153 | #endif | ||
150 | 154 | ||
151 | if (strncmp(name, "/dev/", 5) != 0) { | 155 | if (strncmp(name, "/dev/", 5) != 0) { |
152 | unsigned maj, min; | 156 | unsigned maj, min; |