Skip to contentSkip to conversation

include/mountutils.h: fix LSMT_ROOT definition

PATCH In review Thomas Petazzoni 2 participants 2 messages May 30 – Jun 1 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include/mountutils.h: fix LSMT_ROOT definition

From: Shubham Chakraborty <[email protected]>

Commit
ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils:
add statmount and listmount") introduce a fallback definition for the LSMT_ROOT defined, but a small typo makes this fallback definition ineffective:

#ifdef LSMT_ROOT

 # define LSMT_ROOT ...
 #endif

Should obviously have been:

#ifndef LSMT_ROOT

 # define LSMT_ROOT ...
 #endif
[Thomas: improve commit message]
---
 include/mountutils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/mountutils.h +1 -1
index 9eba451d4..057a29d90 100644
@@ -371,7 +371,7 @@ struct ul_statmount {
 /*
  * Special @mnt_id values that can be passed to listmount
  */
-#ifdef LSMT_ROOT
+#ifndef LSMT_ROOT
 # define LSMT_ROOT              0xffffffffffffffff    /* root mount */
 #endif
 
Signature · 1 line
2.54.0
maintainer
#1 lore raw
Quoted 9 lines · Thomas Petazzoni

#ifdef LSMT_ROOT

 # define LSMT_ROOT ...
 #endif

Should obviously have been:

#ifndef LSMT_ROOT

 # define LSMT_ROOT ...
 #endif

Ah, nice. Applied (and also backported to stable/v2.42), thanks!

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com