/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#include "dlink.h"
#if ! defined(__BIG_ENDIAN) && ! defined(__LITTLE_ENDIAN)
#endif
#include "md_u.h"
#include "md_p.h"
-int Examine(mddev_dev_t devlist, int brief, char *conffile)
+int Examine(mddev_dev_t devlist, int brief, int scan)
{
/* Read the raid superblock from a device and
*
* utime, state etc
*
- * If (brief) gather devices for same array and just print a mdctl.conf line including devices=
+ * If (brief) gather devices for same array and just print a mdadm.conf line including devices=
* if devlist==NULL, use conf_get_devs(
*/
int fd;
char *c;
int rv = 0;
int err;
- int scan= 0;
struct array {
mdp_super_t super;
struct array *next;
} *arrays = NULL;
- if (devlist == NULL) {
- devlist = conf_get_devs(conffile);
- scan=1;
- }
- if (devlist == NULL) {
- fprintf(stderr, Name ": No devices listed in %s\n", conffile);
- return 1;
- }
-
for (; devlist ; devlist=devlist->next) {
fd = open(devlist->devname, O_RDONLY);
if (fd < 0) {
printf(" Creation Time : %.24s\n", ctime(&atime));
c=map_num(pers, super.level);
printf(" Raid Level : %s\n", c?c:"-unknown-");
- printf(" Device Size : %d%s\n", super.size, human_size(super.size));
+ printf(" Device Size : %d%s\n", super.size, human_size((long long)super.size<<10));
printf(" Raid Disks : %d\n", super.raid_disks);
printf(" Total Disks : %d\n", super.nr_disks);
printf("Preferred Minor : %d\n", super.md_minor);