summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens2026-02-15 18:20:01 +0000
committerHauke Mehrtens2026-02-15 18:20:01 +0000
commit8d377aa627be1ae538f8cdeb3295c0c39b9b1d90 (patch)
treea261b6eaa8775cef268fc679d3d46d3159cfd74d
parent12858e2878efe973049bc9fdbaf48860b9747ce3 (diff)
downloadfstools-master.tar.gz
libfstools: Rename PATH_MAX to MTD_PATH_MAXHEADmaster
The PATH_MAX defined here could conflict with PATH_MAX in include/limits.h. The definition in snapshot.h is not used. Just remove the definition from snapshot.h, because it is not used and rename the other definition. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--libfstools/mtd.c4
-rw-r--r--libfstools/snapshot.h1
2 files changed, 2 insertions, 3 deletions
diff --git a/libfstools/mtd.c b/libfstools/mtd.c
index fe38145..512bc6e 100644
--- a/libfstools/mtd.c
+++ b/libfstools/mtd.c
@@ -25,7 +25,7 @@
#include "volume.h"
-#define PATH_MAX 256
+#define MTD_PATH_MAX 256
struct mtd_volume {
struct volume v;
@@ -39,7 +39,7 @@ static struct driver mtd_driver;
static int mtd_open(const char *mtd, int block)
{
FILE *fp;
- char dev[PATH_MAX];
+ char dev[MTD_PATH_MAX];
int i, ret, flags = O_RDWR | O_SYNC;
if ((fp = fopen("/proc/mtd", "r"))) {
diff --git a/libfstools/snapshot.h b/libfstools/snapshot.h
index 636f004..453826e 100644
--- a/libfstools/snapshot.h
+++ b/libfstools/snapshot.h
@@ -14,7 +14,6 @@
#ifndef _SNAPSHOT_H__
#define _SNAPSHOT_H__
-#define PATH_MAX 256
#define OWRT 0x4f575254
#define DATA 0x44415441
#define CONF 0x434f4e46