Displaying 20 results from an estimated 343 matches for "progname".
2016 Aug 18
5
[PATCH v2 0/4] New getprogname module
Hi,
as discussed in [1], this series adds a new getprogname module.
All it does is providing a getprogname function, much like what is
found on e.g. *BSD systems, and using it in gnulib instead of progname.
Also, using it explicitly by modules avoids gnulib users the need of
either use the progname module (GPL), or to provide program_name (and
call set_prog...
2011 Jul 05
0
[PATCH] losetup: use stdout and return 0 for -h
...++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/usr/utils/losetup.c b/usr/utils/losetup.c
index 59030d7..9deacd4 100644
--- a/usr/utils/losetup.c
+++ b/usr/utils/losetup.c
@@ -353,14 +353,16 @@ int del_loop (const char *device)
int verbose = 0;
char *progname;
-static void usage(void) {
- fprintf(stderr, "usage:\n\
+static void usage(FILE *f)
+{
+ fprintf(f, "usage:\n\
%s loop_device # give info\n\
%s -d loop_device # delete\n\
%s -f...
2007 Nov 16
8
[PATCH 0/6] Add online resize for ocfs2-tools,take 1
Add online resize in tunefs.ocfs2 so that user can increase
the volume when it is mounted.
2010 Oct 01
3
[PATCH 1/2] Add -u and -g options to febootstrap-supermin-helper
Bash automatically resets euid to uid when it executes. This can mean that the
effective user id of a program at the point it calls febootstrap-supermin-helper
can be lost if any part of execution chain involved bash. This in turn can
result in:
* the generation of an incorrect checksum, which contains the uid.
* the generation of supermin files with differing owners
The -u and -g options allow
2016 Jan 06
0
[klibc:master] readlink: Add -f option
...x.intel.com>
---
usr/utils/readlink.c | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c
index 4e3cfcb..ffb0b1f 100644
--- a/usr/utils/readlink.c
+++ b/usr/utils/readlink.c
@@ -7,24 +7,45 @@ const char *progname;
static __noreturn usage(void)
{
- fprintf(stderr, "Usage: %s link...\n", progname);
+ fprintf(stderr, "Usage: %s [-f] link...\n", progname);
exit(1);
}
int main(int argc, char *argv[])
{
+ int c, f_flag = 0;
const char *name;
char link_name[PATH_MAX];
int rv;...
2016 Aug 04
0
[PATCH] build: Add silent rules for podwrapper.
...ols.
diff --git a/podwrapper.pl.in b/podwrapper.pl.in
index 7322a30..e9cafed 100755
--- a/podwrapper.pl.in
+++ b/podwrapper.pl.in
@@ -520,7 +520,7 @@ if ($man) {
unlink $man;
die "$input: errors or warnings in this POD file, see messages above\n"
}
- print "$progname: wrote $man\n";
+ #print "$progname: wrote $man\n";
}
# Output HTML.
@@ -618,7 +618,7 @@ if ($html) {
unlink $html;
die "$input: errors or warnings in this POD file, see messages above\n"
}
- print "$progname: wrote $html\n";
+...
2014 Sep 27
1
[PATCH 2/2] readlink: Add -f option
...mounting non-root filesystems in
initramfs-tools.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
initramfs-tools 0.117 only works with busybox; this should allow it to
work with klibc again.
Ben.
--- a/usr/utils/readlink.c
+++ b/usr/utils/readlink.c
@@ -7,24 +7,45 @@ const char *progname;
static __noreturn usage(void)
{
- fprintf(stderr, "Usage: %s link...\n", progname);
+ fprintf(stderr, "Usage: %s [-f] link...\n", progname);
exit(1);
}
int main(int argc, char *argv[])
{
+ int c, f_flag = 0;
const char *name;
char link_name[PATH_MAX];
int rv;...
2016 Apr 12
0
[PATCH] Add internal documentation to C files.
...em B<--output output.pod>
+
+Set the name of the output file (required).
+
+=cut
+
+my $srcdir = ".";
+
+=item B<--srcdir top_srcdir>
+
+Path to the top source directory. Input filenames are
+located relative to this path.
+
+=back
+
+=cut
+
+# Clean up the program name.
+my $progname = $0;
+$progname =~ s{.*/}{};
+
+# Parse options.
+GetOptions ("help|?" => \$help,
+ "output=s" => \$output,
+ "srcdir=s" => \$srcdir,
+ ) or pod2usage (2);
+pod2usage (1) if $help;
+
+die "$progname: missing -o/--output parameter...
2016 Jan 06
0
[PATCH klibc] gzip: Fix silent fallback to decompression
...*/
int no_name = -1; /* don't save or restore the original file name */
@@ -259,17 +262,13 @@ int main (argc, argv)
* Systems which do not support links can still use -d or -dc.
* Ignore an .exe extension for MSDOS, OS/2 and VMS.
*/
-#ifndef decompress
if ( strncmp(progname, "un", 2) == 0 /* ungzip, uncompress */
|| strncmp(progname, "gun", 3) == 0) { /* gunzip */
- decompress = 1;
+ decompress_wanted = 1;
}
-#endif
if (strequ(progname+1, "cat") /* zcat, pcat, gcat */
|| strequ(progname, "gzcat"))...
2016 Jan 06
0
[klibc:master] gzip: Fix silent fallback to decompression
...*/
int no_name = -1; /* don't save or restore the original file name */
@@ -259,17 +262,13 @@ int main (argc, argv)
* Systems which do not support links can still use -d or -dc.
* Ignore an .exe extension for MSDOS, OS/2 and VMS.
*/
-#ifndef decompress
if ( strncmp(progname, "un", 2) == 0 /* ungzip, uncompress */
|| strncmp(progname, "gun", 3) == 0) { /* gunzip */
- decompress = 1;
+ decompress_wanted = 1;
}
-#endif
if (strequ(progname+1, "cat") /* zcat, pcat, gcat */
|| strequ(progname, "gzcat"))...
2016 Feb 29
1
Discarding empty lines in rsyslog
Dear CentOS folk,
I've been try to solve one issue with rsyslog on CentOS 6, but can't
figure it out. I've searched through rsyslog documentation, and used
Google but not found anything that matches my issue.
I'm sending output of a program to rsyslog using "logger -t progname".
I've got the following config snippet in /etc/rsyslog.d:
$FileCreateMode 0644
if $programname == 'progname' then /var/log/prog.log
& ~
This works. However, the program sometimes produces blank lines its
output, and they get logged by rsyslog as well. I want to make rsyslog...
2012 May 22
0
Logging progname with Rails differs from Ruby
There are some differences in how Ruby 1.9.3-p198 and Rails 3.2.3
handle logging a program name.
# Standard Ruby Logger:
logger.error(''program name''){''message''}
logger.error(''program name''){exception}
# Rails:
Rails.logger.error(''message'', ''program name'')
Rails.logger.error(exception, ''program
2014 Apr 15
0
[klibc:master] readlink: Handle multiple input arguments
...++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c
index 8b620fd..bf9501b 100644
--- a/usr/utils/readlink.c
+++ b/usr/utils/readlink.c
@@ -3,11 +3,11 @@
#include <unistd.h>
#include <sys/stat.h>
-char *progname;
+const char *progname;
static __noreturn usage(void)
{
- fprintf(stderr, "Usage: %s link\n", progname);
+ fprintf(stderr, "Usage: %s link...\n", progname);
exit(1);
}
@@ -16,19 +16,22 @@ int main(int argc, char *argv[])
const char *name;
char link_name[PATH_MAX];...
2010 Mar 14
0
[patches] klibc review unsorted patch queue
...t;
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <sys/sysmacros.h>
+#include <string.h>
+
+#include "loop.h"
+
+extern int verbose;
+extern char *progname;
+extern char *xstrdup (const char *s); /* not: #include "sundries.h" */
+extern void error (const char *fmt, ...); /* idem */
+
+/* caller guarantees n > 0 */
+void xstrncpy(char *dest, const char *src, size_t n)
+{
+ strncpy(dest, src, n-1);
+ dest[n-1] = 0;
+}
+
+
+static int loop_i...
2019 Nov 05
0
[klibc:master] losetup: Use LOOP_CTL_GET_FREE to find free device
...d = open("/dev/loop-control", O_RDWR);
+ if (fd < 0) {
+ error("%s: could not open /dev/loop-control. Maybe this kernel "
+ "does not know\n"
+ " about the loop device? (If so, recompile or "
+ "`modprobe loop'.)", progname);
+ return NULL;
}
-
- if (!somedev)
- error("%s: could not find any device /dev/loop#", progname);
- else if (!someloop && permission)
- error("%s: no permission to look at /dev/loop#", progname);
- else if (!someloop)
- error(
- "%s: Could not find any...
[PATCH v1 INCOMPLETE] tests: Implement script to check documented tool options match actual options.
2016 Jul 18
0
[PATCH v1 INCOMPLETE] tests: Implement script to check documented tool options match actual options.
...intend to document.
+
+=head1 OPTIONS
+
+=over 4
+
+=cut
+
+my $help;
+
+=item B<--help>
+
+Display brief help.
+
+=cut
+
+my $ignore = "";
+
+=item B<--ignore=--arg,--arg,...>
+
+Ignore the comma-separated list of arguments given.
+
+=cut
+
+# Clean up the program name.
+my $progname = $0;
+$progname =~ s{.*/}{};
+
+# Parse options.
+GetOptions ("help|?" => \$help,
+ "ignore=s" => \$ignore,
+ ) or pod2usage (2);
+pod2usage (1) if $help;
+
+die "$progname: missing argument: pod-arg-check.pl input.pod tool\n"
+ unless @ARGV ==...
2019 Jul 09
7
[PATCH 0/5] Split virt-p2v in own repository
Hi,
as it was already discussed on this list, here it is my attempt in
splitting virt-p2v in an own repository. Sadly there are things that
must be copied from libguestfs, as it cannot be avoided.
The approach taken was to run a script (will send separately) to just
get the "p2v" subdirectory with its history as own repository, and then
add in few followup commits all the bits needed
2023 Oct 31
1
system()/system2() using short paths of commands on Windows?
...('fmtutil-sys --all') works fine.
>
> I can reproduce the problem, also separately from R. It is not an R problem
>
> ./fmtutil-sys.exe --version
> works
>
> ./fmtuti~1 --version
> doesn't work
>
> The problem is in runscript.tlu, when it looks at "progname", it parses
> it assuming it is the full name, looking for "-sys" suffix, which won't
> be in the short name:
>
> progname, substcount = string.gsub(progname, '%-sys$', '')
> local sysprog = (substcount > 0) -- true if there was a -sys suffix re...
2023 Oct 31
1
system()/system2() using short paths of commands on Windows?
...t
> TeX Live developers).
>
> BTW, shell('fmtutil-sys --all') works fine.
I can reproduce the problem, also separately from R. It is not an R problem
./fmtutil-sys.exe --version
works
./fmtuti~1 --version
doesn't work
The problem is in runscript.tlu, when it looks at "progname", it parses
it assuming it is the full name, looking for "-sys" suffix, which won't
be in the short name:
progname, substcount = string.gsub(progname, '%-sys$', '')
local sysprog = (substcount > 0) -- true if there was a -sys suffix removed
and it does furt...
2019 Nov 26
0
[PATCH libguestfs 1/3] podwrapper: __INCLUDE:file.pod__ and __VERBATIM:file.txt__ in POD files.
...erbatims) {
if $content eq $oldcontent;
}
+# Perform VERBATIM directives.
+$content =~ s{__VERBATIM:([-a-z0-9_]+\.txt)__}
+ {read_verbatim_file ("$1", path => $path)}ge;
+
# There should be no =encoding line present in the content (we will add one).
die "$progname: $input: =encoding must not be present in input\n"
if $content =~ /^=encoding/m;
@@ -642,11 +682,29 @@ if ($text) {
#print "$progname: wrote $text\n";
}
+sub find_file
+{
+ my $input = shift;
+ my $path = shift;
+ local $_;
+
+ my @path = (".");
+...