Remove the local -c chroot change, unused now.

pull/1/head
matthieu 2018-07-09 21:16:41 +00:00
parent fddab55788
commit 3d6c235903
3 changed files with 5 additions and 29 deletions

View File

@ -9,7 +9,7 @@
fc-cache \- build font information cache files
.SH SYNOPSIS
\fBfc-cache\fR [ \fB-cEfrsvVh\fR ] [ \fB--chroot root\fR ] [ \fB--error-on-no-fonts\fR ] [ \fB--force\fR ] [ \fB--really-force\fR ] [ \fB-y \fIdir\fB\fR | \fB--sysroot \fIdir\fB\fR ] [ \fB--system-only\fR ] [ \fB--verbose\fR ] [ \fB--version\fR ] [ \fB--help\fR ] [ \fB\fIdir\fB\fR\fI ...\fR ]
\fBfc-cache\fR [ \fB-EfrsvVh\fR ] [ \fB--error-on-no-fonts\fR ] [ \fB--force\fR ] [ \fB--really-force\fR ] [ \fB-y \fIdir\fB\fR | \fB--sysroot \fIdir\fB\fR ] [ \fB--system-only\fR ] [ \fB--verbose\fR ] [ \fB--version\fR ] [ \fB--help\fR ] [ \fB\fIdir\fB\fR\fI ...\fR ]
.SH "DESCRIPTION"
.PP
@ -39,10 +39,6 @@ Raise an error if there are no fonts in
\fB\fIdir\fB\fR or directories
in the configuration if not given.
.TP
\fB-c root --chroot root \fR
Change root directory into root
before starting.
.TP
\fB-f --force \fR
Force re-generation of apparently up-to-date cache files,
overriding the timestamp checking.

View File

@ -65,7 +65,6 @@
#define _GNU_SOURCE
#include <getopt.h>
const struct option longopts[] = {
{"chroot", 0, 0, 'c'},
{"error-on-no-fonts", 0, 0, 'E'},
{"force", 0, 0, 'f'},
{"really-force", 0, 0, 'r'},
@ -289,20 +288,16 @@ main (int argc, char **argv)
int i;
int changed;
int ret;
char *destdir = NULL;
#if HAVE_GETOPT_LONG || HAVE_GETOPT
int c;
#if HAVE_GETOPT_LONG
while ((c = getopt_long (argc, argv, "c:Efrsy:Vvh", longopts, NULL)) != -1)
while ((c = getopt_long (argc, argv, "Efrsy:Vvh", longopts, NULL)) != -1)
#else
while ((c = getopt (argc, argv, "c:Efrsy:Vvh")) != -1)
while ((c = getopt (argc, argv, "Efrsy:Vvh")) != -1)
#endif
{
switch (c) {
case 'c':
destdir = optarg;
break;
case 'E':
error_on_no_fonts = FcTrue;
break;
@ -335,14 +330,7 @@ main (int argc, char **argv)
#else
i = 1;
#endif
if (destdir) {
if (chroot(destdir) == -1) {
fprintf(stderr, "%s: Can't chroot to %s: %s\n", argv[0], destdir,
strerror(errno));
return 1;
}
systemOnly = FcTrue;
}
if (systemOnly)
FcConfigEnableHome (FcFalse);
if (sysroot)

View File

@ -63,8 +63,7 @@ manpage.1: manpage.sgml
<cmdsynopsis>
<command>&dhpackage;</command>
<arg><option>-cEfrsvVh</option></arg>
<arg><option>--chroot <replacable>root</replacable></option></arg>
<arg><option>-EfrsvVh</option></arg>
<arg><option>--error-on-no-fonts</option></arg>
<arg><option>--force</option></arg>
<arg><option>--really-force</option></arg>
@ -119,13 +118,6 @@ manpage.1: manpage.sgml
</listitem>
</varlistentry>
<varlistentry>
<term><option>-c <replacable>root</replacable></option>
<option>--chroot <replacable>root</replacable></option>
</term>
<listitem>
<para>Change root directory into <replacable>root</replacable>
before starting.</para>
</listitem>
<term><option>-f</option>
<option>--force</option>
</term>