#
PKG_MAJOR=2
PKG_MINOR=5
-PKG_REVISION=0
+PKG_REVISION=1
PKG_BUILD=0
-xfsprogs (2.5.0-1) unstable; urgency=low
+xfsprogs (2.5.1-1) unstable; urgency=low
* New upstream release
* Changed mkfs.xfs default log size scaling algorithm slightly, to
create larger logs at smaller filesystem sizes by default
* Enable support for sector sizes larger than 512 bytes
- -- Nathan Scott <nathans@debian.org> Wed, 18 Jun 2003 12:56:16 +1000
+ -- Nathan Scott <nathans@debian.org> Mon, 23 Jun 2003 11:15:06 +1000
xfsprogs (2.4.12-1) unstable; urgency=low
+xfsprogs-2.5.1 (23 June 2003)
+ - Fix libdisk device driver (volume managers) detection code
+ used by mkfs, so that drivers with multiple majors are not
+ incorrectly processed.
+
xfsprogs-2.5.0 (18 June 2003)
- Fix libdisk (and hence mkfs) code which warns on MD devices
with the clean flag not set, apparently this is not so wise.
/*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
} sv_type_t;
extern void get_subvol_stripe_wrapper (char *, sv_type_t, int *, int *);
-extern int get_driver_block_major (const char *);
+extern int get_driver_block_major (const char *, int);
#endif /* __VOLUME_H__ */
/*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
/* ... add new device drivers here */
}
+#define DEVICES "/proc/devices"
+
/*
* General purpose routine which dredges through procfs trying to
* match up device driver names with the associated major numbers
* being used in the running kernel.
*/
int
-get_driver_block_major(const char *driver)
+get_driver_block_major(const char *driver, int major)
{
FILE *f;
char buf[64], puf[64];
- int major = -1;
+ int dmajor, match = 0;
- if ((f = fopen("/proc/devices", "r")) == NULL)
- return major;
+ if ((f = fopen(DEVICES, "r")) == NULL)
+ return match;
while (fgets(buf, sizeof(buf), f)) /* skip to block dev section */
if (strncmp("Block devices:\n", buf, sizeof(buf)) == 0)
break;
while (fgets(buf, sizeof(buf), f))
- if ((sscanf(buf, "%u %s\n", &major, puf) == 2) &&
- (strncmp(puf, driver, sizeof(puf)) == 0))
- goto found;
- major = -1;
-found:
+ if ((sscanf(buf, "%u %s\n", &dmajor, puf) == 2) &&
+ (strncmp(puf, driver, sizeof(puf)) == 0) &&
+ (dmajor == major))
+ match = 1;
fclose(f);
- return major;
+ return match;
}
#include "evms.h"
int
-mnt_is_evms_subvol(dev_t dev)
+mnt_is_evms_subvol(
+ dev_t dev)
{
if (major(dev) == EVMS_MAJOR)
return 1;
- if (major(dev) == get_driver_block_major("evms"))
- return 1;
- return 0;
+ return get_driver_block_major("evms", major(dev));
}
int
/*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
#endif
int
-mnt_is_lvm_subvol(dev_t dev)
+mnt_is_lvm_subvol(
+ dev_t dev)
{
if (major(dev) == LVM_BLK_MAJOR)
return 1;
- if (major(dev) == get_driver_block_major("lvm"))
- return 1;
- return 0;
+ return get_driver_block_major("lvm", major(dev));
}
int
#include "md.h"
int
-mnt_is_md_subvol(dev_t dev)
+mnt_is_md_subvol(
+ dev_t dev)
{
if (major(dev) == MD_MAJOR)
return 1;
- if (major(dev) == get_driver_block_major("md"))
- return 1;
- return 0;
+ return get_driver_block_major("md", major(dev));
}
int
/*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
#include <stdio.h>
#include <fcntl.h>
+#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "xvm.h"
int
-mnt_is_xvm_subvol(dev_t dev)
+mnt_is_xvm_subvol(
+ dev_t dev)
{
- if (major(dev) == get_driver_block_major("xvm"))
- return 1;
- return 0;
+ return get_driver_block_major("xvm", major(dev));
}
/*