summaryrefslogtreecommitdiffstats
path: root/daemon/ext2.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/ext2.c')
-rw-r--r--daemon/ext2.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/daemon/ext2.c b/daemon/ext2.c
index a6439352..02cd68aa 100644
--- a/daemon/ext2.c
+++ b/daemon/ext2.c
@@ -29,9 +29,6 @@
#include "c-ctype.h"
#include "actions.h"
-/* Confirmed this is true up to ext4 from the Linux sources. */
-#define EXT2_LABEL_MAX 16
-
#define MAX_ARGS 64
/* Choose which tools like mke2fs to use. For RHEL 5 (only) there
@@ -154,28 +151,7 @@ do_tune2fs_l (const char *device)
int
do_set_e2label (const char *device, const char *label)
{
- int r;
- char *err;
-
- char prog[] = "e2label";
- if (e2prog (prog) == -1)
- return -1;
-
- if (strlen (label) > EXT2_LABEL_MAX) {
- reply_with_error ("%s: ext2 labels are limited to %d bytes",
- label, EXT2_LABEL_MAX);
- return -1;
- }
-
- r = command (NULL, &err, prog, device, label, NULL);
- if (r == -1) {
- reply_with_error ("%s", err);
- free (err);
- return -1;
- }
-
- free (err);
- return 0;
+ return do_set_label (device, label);
}
char *