From 4d09bffb944c78a60d6a1b176503a42870646b33 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Wed, 20 May 2026 00:20:52 +0200 Subject: [PATCH] Support the root filesystem as data and parity disk --- cmdline/state.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmdline/state.c b/cmdline/state.c index aeee94eb..4352857f 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -722,10 +722,9 @@ void state_config(struct snapraid_state* state, const char* path, const char* co pathimport(device, sizeof(device), split_map[s]); slash = strrchr(device, '/'); if (slash) - *slash = 0; + slash[1] = 0; else pathcpy(device, sizeof(device), "."); - if (stat(device, &st) == 0) { dev = st.st_dev; @@ -875,7 +874,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co pathimport(device, sizeof(device), buffer); slash = strrchr(device, '/'); if (slash) - *(slash + 1) = 0; + slash[1] = 0; else pathcpy(device, sizeof(device), "."); if (stat(device, &st) == 0) {