diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-07-25 13:21:48 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-07-25 13:21:48 +1000 |
commit | d464fc598a356f48d509db047017b213f115a1d6 (patch) | |
tree | 32c57599f30555f6704ad81e1aa880507f33648c /block | |
parent | 947b1a86027dd1fe603acb6556324e1f40b2414d (diff) | |
parent | e284f3493206d4268267db4557c7ee6f89ed2314 (diff) |
Merge remote-tracking branch 'bcon/master'
Conflicts:
drivers/block/Kconfig
Diffstat (limited to 'block')
-rw-r--r-- | block/partitions/Makefile | 1 | ||||
-rw-r--r-- | block/partitions/blockconsole.c | 22 | ||||
-rw-r--r-- | block/partitions/check.c | 3 | ||||
-rw-r--r-- | block/partitions/check.h | 3 |
4 files changed, 29 insertions, 0 deletions
diff --git a/block/partitions/Makefile b/block/partitions/Makefile index 2be4d7ba4e3a..d79da0be0b2d 100644 --- a/block/partitions/Makefile +++ b/block/partitions/Makefile @@ -19,3 +19,4 @@ obj-$(CONFIG_IBM_PARTITION) += ibm.o obj-$(CONFIG_EFI_PARTITION) += efi.o obj-$(CONFIG_KARMA_PARTITION) += karma.o obj-$(CONFIG_SYSV68_PARTITION) += sysv68.o +obj-$(CONFIG_BLOCKCONSOLE) += blockconsole.o diff --git a/block/partitions/blockconsole.c b/block/partitions/blockconsole.c new file mode 100644 index 000000000000..79796a8799e9 --- /dev/null +++ b/block/partitions/blockconsole.c @@ -0,0 +1,22 @@ +#include <linux/blockconsole.h> + +#include "check.h" + +int blockconsole_partition(struct parsed_partitions *state) +{ + Sector sect; + void *data; + int err = 0; + + data = read_part_sector(state, 0, §); + if (!data) + return -EIO; + if (!bcon_magic_present(data)) + goto out; + + bcon_add(state->name); + err = 1; +out: + put_dev_sector(sect); + return err; +} diff --git a/block/partitions/check.c b/block/partitions/check.c index 19ba207ea7d1..21786ed8876e 100644 --- a/block/partitions/check.c +++ b/block/partitions/check.c @@ -42,6 +42,9 @@ static int (*check_part[])(struct parsed_partitions *) = { * Probe partition formats with tables at disk address 0 * that also have an ADFS boot block at 0xdc0. */ +#ifdef CONFIG_BLOCKCONSOLE + blockconsole_partition, +#endif #ifdef CONFIG_ACORN_PARTITION_ICS adfspart_check_ICS, #endif diff --git a/block/partitions/check.h b/block/partitions/check.h index eade17ea910b..bca962498642 100644 --- a/block/partitions/check.h +++ b/block/partitions/check.h @@ -52,3 +52,6 @@ put_partition(struct parsed_partitions *p, int n, sector_t from, sector_t size) extern int warn_no_part; +#ifdef CONFIG_BLOCKCONSOLE +int blockconsole_partition(struct parsed_partitions *state); +#endif |