diff options
author | Luca Berra <bluca@comedia.it> | 2006-10-16 15:26:53 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-10-16 15:26:53 +1000 |
commit | 435d4ebb2e39fec062e201d287e8f73369291522 (patch) | |
tree | e545579e6e07580ada3237aef9e9bf72bce4dc25 /util.c | |
parent | b39827de21032f5bda931242f232ec9c3cb7da98 (diff) | |
download | mdadm-435d4ebb2e39fec062e201d287e8f73369291522.tar.gz mdadm-435d4ebb2e39fec062e201d287e8f73369291522.tar.xz mdadm-435d4ebb2e39fec062e201d287e8f73369291522.zip |
Mdassemble improvements
From: Luca Berra <bluca@comedia.it>
- Fix a bug where mdassemble didn't close a filedescriptor and so couldn't assembele
stacked arrays.
- Allow mdassemble, when run a second time, to mark all arrays as writable.
This is useful if they are started read-only as is best at boot-time.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -241,6 +241,7 @@ int same_uuid(int a[4], int b[4], int swapuuid) } } +#ifndef MDASSEMBLE int check_ext2(int fd, char *name) { /* @@ -338,6 +339,7 @@ int ask(char *mesg) fprintf(stderr, Name ": assuming 'no'\n"); return 0; } +#endif /* MDASSEMBLE */ char *map_num(mapping_t *map, int num) { @@ -534,6 +536,7 @@ unsigned long calc_csum(void *super, int bytes) return csum; } +#ifndef MDASSEMBLE char *human_size(long long bytes) { static char buf[30]; @@ -586,7 +589,9 @@ char *human_size_brief(long long bytes) ); return buf; } +#endif +#if !defined(MDASSEMBLE) || defined(MDASSEMBLE) && defined(MDASSEMBLE_AUTO) int get_mdp_major(void) { static int mdp_major = -1; @@ -670,6 +675,7 @@ void put_md_name(char *name) if (strncmp(name, "/dev/.tmp.md", 12)==0) unlink(name); } +#endif /* !defined(MDASSEMBLE) || defined(MDASSEMBLE) && defined(MDASSEMBLE_AUTO) */ int dev_open(char *dev, int flags) { |