From 3121eeb5e68bedd6e2398f35b9bd60b69709a47e Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Tue, 14 Dec 2021 18:49:54 +0100 Subject: [PATCH] Replace hardcoded command length --- src/screenshot/screenshot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/screenshot/screenshot.c b/src/screenshot/screenshot.c index 9df0ea7..5f27681 100644 --- a/src/screenshot/screenshot.c +++ b/src/screenshot/screenshot.c @@ -42,8 +42,9 @@ static bool exec_screenshooter_interactive(const char *path) { perror("fork"); return false; } else if (pid == 0) { - char cmd[strlen(path) + 25]; - snprintf(cmd, sizeof(cmd), "grim -g \"$(slurp)\" -- %s", path); + const char cmd_fmt[] = "grim -g \"$(slurp)\" -- %s"; + char cmd[strlen(path) + sizeof(cmd_fmt)]; + snprintf(cmd, sizeof(cmd), cmd_fmt, path); execl("/bin/sh", "/bin/sh", "-c", cmd, NULL); perror("execl"); exit(127); -- 2.34.0 class='sub right'>
aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/examples/plasma.tmpl
AgeCommit message (Expand)Author
2023-08-22examples: Avoid duplicate SDDM service for Plasma on aarch64-linux....This is a followup to cf28f46930f1ea4087d84c162cfacfcdff842b1f. * gnu/system/examples/plasma.tmpl (services): Remove both 'gdm-service-type' and 'sddm-service-type' from %DESKTOP-SERVICES. Ludovic Courtès
2023-08-21examples: Avoid 'modify-services' to remove GDM....This led to a 'tests/guix-system.sh' failure on aarch64-linux: …/plasma.tmpl:60:13: error: modify-services: service 'gdm' not found in service list This is because 'gdm-service-type' is not among %DESKTOP-SERVICES on that architecture. * gnu/system/examples/plasma.tmpl (services): Use 'remove' rather 'modify-services' + 'delete'. Ludovic Courtès
2023-08-03examples: Add plasma operating-system example template....* gnu/system/examples/plasma.tmpl: New file. * Makefile.am (EXAMPLES): register it. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Zheng Junjie