Files
libguestfs/po
Richard W.M. Jones 8bf4455936 daemon: Remove remaining uses of custom printf %Q and %R
We have traditionally used custom printf formatters %Q and %R, where
%Q replaces the argument with a shell-quoted string, and %R replaces
the argument with a sysroot-prefixed shell-quoted string.  They are
actually pretty useful, but unfortunately only supported by glibc.

We only used them in about a dozen places in the daemon (much code
having been replaced by OCaml which does not need them).

In every remaining case we were constructing a command using code like
this:

  asprintf_nowarn (&cmd,
         "cd %Q && find -print0 | %s -0 -o -H %s --quiet", ...);

We can replace this with:

  char *cmd;
  size_t cmd_size;
  fp = open_memstream (&cmd, &cmd_size);
  fprintf (fp, "cd ");
  shell_quote (dir, fp);
  fprintf (fp, " && find -print0 | %s -0 -o -H %s --quiet", ...);
  fclose (fp);

(cherry picked from commit 0b3c6cc0c0)
2022-11-21 18:10:55 +00:00
..
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-07-06 16:29:28 +01:00
2022-03-19 17:17:02 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00
2022-05-12 14:46:16 +01:00