hw/s390x/ccw: Cleanup basename() and dirname()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | hw/s390x/ccw: Replace basename() with g_path_get_basename()hw/ | +3 | 1 reply | |
| 2/2 | hw/s390x/ccw: Replace dirname() with g_path_get_dirname()hw/ | +3 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Eric Farman | Cédric Le Goater |
|---|---|---|
| Series | R-b | |
| 1/2 | R-b | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] hw/s390x/ccw: Cleanup basename() and dirname()
From: Zhao Liu <[email protected]>
As commit 3e015d815b3f ("use g_path_get_basename instead of basename") said, g_path_get_basename() and g_path_get_dirname() should be preferred over basename() and dirname(), since g_path_get_basename() and g_path_get_dirname() are portable utility functions that have the advantage of not modifing the string argument.
But commit 3e015d815b3f missed a use of dirname() and basename() in hw/s390x/ccw.
And basename() (in vfio/container) caused compile breakage with the Musl C library [1].
To avoid similar breakage and improve portability, replace basename() and dirname() with g_path_get_basename() and g_path_get_dirname().
[1]: https://lore.kernel.org/all/[email protected]/
---
Zhao Liu (2):
hw/s390x/ccw: Replace basename() with g_path_get_basename() hw/s390x/ccw: Replace dirname() with g_path_get_dirname()
hw/s390x/s390-ccw.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1