Skip to contentSkip to conversation

tst_fill_fs: Fix printf format error

PATCH In review Petr Vorel 2 participants 3 messages Sep 18, 2023 Library code

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 tst_fill_fs: Fix printf format error

openat() first parameter is file descriptor (int), not string. Add also original path (string) to be more informative.

Fixes df1b01cc1 ("tst_fill_fs: drop safe_macro from fill_flat_vec")

---
I'd like to get this tiny fix merged before the release.

Kind regards,
Petr

 lib/tst_fill_fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/tst_fill_fs.c +2 -1
index 243eb279f..5e8cf9197 100644
@@ -93,7 +93,8 @@ void fill_flat_vec(const char *path, int verbose)
 			tst_res(TINFO | TERRNO, "openat()");
 			return;
 		}
-		tst_brk(TBROK | TERRNO, "openat(%s, %d, 0600) failed", dir, O_PATH | O_DIRECTORY);
+		tst_brk(TBROK | TERRNO, "openat(%d, %d, 0600) failed for path %s",
+			dir, O_PATH | O_DIRECTORY, path);
 	}
 
 	SAFE_CLOSE(dir);
Signature · 5 lines
2.42.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by on v1 1/1
#1 lore raw

Hi!

Quoted 5 lines

openat() first parameter is file descriptor (int), not string. Add also original path (string) to be more informative.

Fixes df1b01cc1 ("tst_fill_fs: drop safe_macro from fill_flat_vec")
Quoted 2 lines

---
I'd like to get this tiny fix merged before the release.

Yes please.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#2 lore raw

Hi Cyril,

Quoted 7 lines

Hi!

Quoted 5 lines

openat() first parameter is file descriptor (int), not string. Add also original path (string) to be more informative.

Fixes df1b01cc1 ("tst_fill_fs: drop safe_macro from fill_flat_vec")
Quoted 6 lines
Quoted 2 lines

---
I'd like to get this tiny fix merged before the release.

Yes please.

Thanks for your review, merged.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp