summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/lib.c b/lib.c
index cf2701cd..2b09293c 100644
--- a/lib.c
+++ b/lib.c
@@ -204,35 +204,6 @@ char *fd2devnm(int fd)
return NULL;
}
-/* When we create a new array, we don't want the content to
- * be immediately examined by udev - it is probably meaningless.
- * So create /run/mdadm/creating-mdXXX and expect that a udev
- * rule will noticed this and act accordingly.
- */
-static char block_path[] = "/run/mdadm/creating-%s";
-static char *unblock_path = NULL;
-void udev_block(char *devnm)
-{
- int fd;
- char *path = NULL;
-
- xasprintf(&path, block_path, devnm);
- fd = open(path, O_CREAT|O_RDWR, 0600);
- if (fd >= 0) {
- close(fd);
- unblock_path = path;
- } else
- free(path);
-}
-
-void udev_unblock(void)
-{
- if (unblock_path)
- unlink(unblock_path);
- free(unblock_path);
- unblock_path = NULL;
-}
-
/*
* convert a major/minor pair for a block device into a name in /dev, if possible.
* On the first call, walk /dev collecting name.