--- /dev/null
+/*
+ * Copyright (C) 2001 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#include "activate.h"
+
+struct kernel_interface {
+ int already_mounted;
+ char *mount_point;
+};
+
+/*
+ * Checks that device mapper has been compiled into the kernel.
+ */
+int _check_kernel(void)
+{
+ return 0;
+}
+
+int _find_mountpoint(char *buffer, int len)
+{
+
+}
+
+
+
+int _
+
+int vg_activate(struct volume_group *vg)
+{
+
+}
+
+int lv_activate(struct volume_group *vg, struct logical_volume *lv)
+{
+
+}
+
--- /dev/null
+/*
+ * Copyright (C) 2001 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#ifndef ACTIVATE_H
+#define ACTIVATE_H
+
+int vg_activate(struct volume_group *vg);
+int lv_activate(struct volume_group *vg, struct logical_volume *lv);
+
+#endif
}
static struct physical_volume *_pv_read(struct io_space *is,
- struct device *dev)
+ const char *name)
{
struct pool *mem = pool_create(1024);
struct physical_volume *pv;
struct disk_list *dl;
+ struct device *dev;
if (!mem) {
stack;
return NULL;
}
+ if (!(dev = dev_cache_get(name, is->filter))) {
+ stack;
+ goto bad;
+ }
+
if (!(dl = read_pv(dev, mem, NULL))) {
stack;
goto bad;
/* Return PV with given name (may be full
or relative path) */
struct physical_volume *(*pv_read)(struct io_space *is,
- struct device *dev);
+ const char *name);
/* Write a PV structure to disk. */
/* Fails if the PV is in a VG ie
exit(1);
}
- if (!(dev = dev_cache_get(argv[1], NULL))) {
- fprintf(stderr, "couldn't get device %s\n", argv[1]);
- exit(1);
- }
-
- pv = ios->pv_read(ios, dev);
+ pv = ios->pv_read(ios, argv[1]);
if (!pv) {
fprintf(stderr, "couldn't read pv %s\n", dev->name);
exit(1);
}
- if (!dev_cache_add_dir("/dev/loop")) {
+ if (!dev_cache_add_dir("/dev/")) {
fprintf(stderr, "couldn't add /dev to dir-cache\n");
exit(1);
}