Skip to content

Commit

Permalink
prepare: Change mount etc to absolute path
Browse files Browse the repository at this point in the history
Coverity points out that ""/sysroot.tmp/etc"" could be a copy-paste
error.
  • Loading branch information
lukewarmtemp committed Jun 12, 2024
1 parent 377dc62 commit 4b0fec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/switchroot/ostree-prepare-root.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ main (int argc, char *argv[])
else
{
/* Bind-mount /etc (at deploy path), and remount as writable. */
if (mount ("etc", TMP_SYSROOT "/etc", NULL, MS_BIND | MS_SILENT, NULL) < 0)
if (mount ("/etc", TMP_SYSROOT "/etc", NULL, MS_BIND | MS_SILENT, NULL) < 0)
err (EXIT_FAILURE, "failed to prepare /etc bind-mount at /sysroot.tmp/etc");
if (mount (TMP_SYSROOT "/etc", TMP_SYSROOT "/etc", NULL, MS_BIND | MS_REMOUNT | MS_SILENT,
NULL)
Expand Down

0 comments on commit 4b0fec2

Please sign in to comment.