diff options
author | Kay Sievers <kay@vrfy.org> | 2012-04-16 17:21:22 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-04-16 19:20:57 +0200 |
commit | 6ada823a9a0979ea145fd70add1007c21caa45c0 (patch) | |
tree | 3eff7319e77b9cdffda502cb373a1eae6c6488bb /src/libudev/libudev-queue-private.c | |
parent | 8fef0ff25c9fd7e5bb99d66f43c6357e4996a3cc (diff) |
udev: remove configuration options for /dev, /sys, /run directories
Diffstat (limited to 'src/libudev/libudev-queue-private.c')
-rw-r--r-- | src/libudev/libudev-queue-private.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/libudev/libudev-queue-private.c b/src/libudev/libudev-queue-private.c index ca6d229a2c..f653e6db4c 100644 --- a/src/libudev/libudev-queue-private.c +++ b/src/libudev/libudev-queue-private.c @@ -101,14 +101,10 @@ struct udev_queue_export *udev_queue_export_unref(struct udev_queue_export *udev void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export) { - char filename[UTIL_PATH_SIZE]; - if (udev_queue_export == NULL) return; - util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev_queue_export->udev), "/queue.tmp", NULL); - unlink(filename); - util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev_queue_export->udev), "/queue.bin", NULL); - unlink(filename); + unlink("/run/udev/queue.tmp"); + unlink("/run/udev/queue.bin"); } static int skip_to(FILE *file, long offset) @@ -201,8 +197,6 @@ static int rebuild_queue_file(struct udev_queue_export *udev_queue_export) { unsigned long long int seqnum; struct queue_devpaths *devpaths = NULL; - char filename[UTIL_PATH_SIZE]; - char filename_tmp[UTIL_PATH_SIZE]; FILE *new_queue_file = NULL; unsigned int i; @@ -218,8 +212,7 @@ static int rebuild_queue_file(struct udev_queue_export *udev_queue_export) } /* create new queue file */ - util_strscpyl(filename_tmp, sizeof(filename_tmp), udev_get_run_path(udev_queue_export->udev), "/queue.tmp", NULL); - new_queue_file = fopen(filename_tmp, "w+"); + new_queue_file = fopen("/run/udev/queue.tmp", "w+"); if (new_queue_file == NULL) goto error; seqnum = udev_queue_export->seqnum_max; @@ -252,8 +245,7 @@ static int rebuild_queue_file(struct udev_queue_export *udev_queue_export) goto error; /* rename the new file on top of the old one */ - util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev_queue_export->udev), "/queue.bin", NULL); - if (rename(filename_tmp, filename) != 0) + if (rename("/run/udev/queue.tmp", "/run/udev/queue.bin") != 0) goto error; if (udev_queue_export->queue_file != NULL) |