pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files/add Added quotes around the...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f5c120d7bb71
branches: trunk
changeset: 534833:f5c120d7bb71
user: rillig <rillig%pkgsrc.org@localhost>
date: Thu Nov 01 23:08:29 2007 +0000
description:
Added quotes around the filenames, as suggested by joerg@.
While here, removed an unnecessary variable.
diffstat:
pkgtools/pkg_install/files/add/perform.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (47 lines):
diff -r ca84fd3bbbdb -r f5c120d7bb71 pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c Thu Nov 01 22:50:40 2007 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c Thu Nov 01 23:08:29 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.64 2007/11/01 21:57:37 rillig Exp $ */
+/* $NetBSD: perform.c,v 1.65 2007/11/01 23:08:29 rillig Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.64 2007/11/01 21:57:37 rillig Exp $");
+__RCSID("$NetBSD: perform.c,v 1.65 2007/11/01 23:08:29 rillig Exp $");
#endif
#endif
@@ -357,7 +357,7 @@
if (Verbose)
printf("mv %s %s\n", replace_from, replace_via);
if (rename(replace_from, replace_via) != 0)
- err(EXIT_FAILURE, "renaming %s to %s failed", replace_from, replace_via);
+ err(EXIT_FAILURE, "renaming \"%s\" to \"%s\" failed", replace_from, replace_via);
*replacing = 1;
}
@@ -393,7 +393,6 @@
plist_t *p;
struct stat sb;
struct utsname host_uname;
- int rc;
uint64_t needed;
Boolean is_depoted_pkg = FALSE;
lfile_t *lfp;
@@ -982,9 +981,8 @@
* Upgrade step 3/4: move back +REQUIRED_BY file
* (see also step 2/4)
*/
- rc = rename(replace_via, replace_to);
- if (rc != 0)
- err(EXIT_FAILURE, "renaming %s to %s failed", replace_via, replace_to);
+ if (rename(replace_via, replace_to) != 0)
+ err(EXIT_FAILURE, "renaming \"%s\" to \"%s\" failed", replace_via, replace_to);
/*
* Upgrade step 4/4: Fix pkgs that depend on us to
Home |
Main Index |
Thread Index |
Old Index