search for: program_name

Displaying 20 results from an estimated 237 matches for "program_name".

2015 Feb 09
2
Re: [PATCH 2/5] macosx: Add definition of program_name for gnulib
On Mon, Feb 09, 2015 at 11:06:16AM +0000, Margaret Lewicka wrote: > gnulib's error.c requires program_name to be externally defined > for !_LIBC systems. This defines program_name for Darwin only. > --- > configure.ac | 3 +++ > src/Makefile.am | 6 ++++++ > src/program_name.c | 4 ++++ > 3 files changed, 13 insertions(+) > create mode 100644 src/program_name.c src/guest...
2015 Feb 11
2
Re: [PATCH 2/5] macosx: Add definition of program_name for gnulib
On Mon, Feb 09, 2015 at 02:55:58PM +0000, Margaret Lewicka wrote: > On 9 February 2015 at 13:10, Daniel P. Berrange <berrange@redhat.com> wrote: > > On Mon, Feb 09, 2015 at 11:06:16AM +0000, Margaret Lewicka wrote: > >> gnulib's error.c requires program_name to be externally defined > >> for !_LIBC systems. This defines program_name for Darwin only. > >> --- > >> configure.ac | 3 +++ > >> src/Makefile.am | 6 ++++++ > >> src/program_name.c | 4 ++++ > >> 3 files changed, 13 insertions(+)...
2015 Feb 09
0
[PATCH 2/5] macosx: Add definition of program_name for gnulib
gnulib's error.c requires program_name to be externally defined for !_LIBC systems. This defines program_name for Darwin only. --- configure.ac | 3 +++ src/Makefile.am | 6 ++++++ src/program_name.c | 4 ++++ 3 files changed, 13 insertions(+) create mode 100644 src/program_name.c diff --git a/configure.ac b/configure.ac ind...
2009 Aug 24
5
[0/5] guestfish: detect stdout-write failure
Nearly any program that writes to standard output can benefit from this sort of fix. Without it, running e.g., ./guestfish --version > /dev/full would exit successfully, even though it got ENOSPC when writing to the full device. That means regular output redirected to a file on a full partition may also fail to be written, and the error ignored. Before: $ guestfish --version >
2006 Feb 01
1
Rails pagination problem
I am having this problem with pagination query in my controller class. I am using SQL server and following code to create pagination fails, complains about column name ''program_name'' (which is valid column/attribute of program) The error message is: DBI::DatabaseError: S0022 (207) [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name ''program_name''.: SELECT * FROM (SELECT TOP 3 * FROM (......rest of query deleted...... query_term = &...
2015 Feb 07
1
Re: Patchable build problems on OS X 10.10
.....] > Linux doesn't have getprogname. One way around this is to add > getprogname to the list of functions in configure.ac AC_CHECK_FUNCS. > That will cause a macro to be defined which you can use like this: > > #if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME == 1 > # define program_name program_invocation_short_name > #elif HAVE_GETPROGNAME > # define program_name getprogname() > #else > # define program_name "libguestfs" > #endif Unfortunately that still doesn't help the issue with gnulib, since it expects char *program_name to be set on...
2015 Feb 11
0
Re: [PATCH 2/5] macosx: Add definition of program_name for gnulib
On 11 February 2015 at 13:46, Richard W.M. Jones <rjones@redhat.com> wrote: [...] > On non-glibc, error.c says: > > /* The calling program should define program_name and set it to the > name of the executing program. */ > extern char *program_name; > > This indicates to me that we shouldn't define `program_name' as a symbol > in libguestfs. Instead every libguestfs-using program should define > it. For example, virt-df (df/ma...
2015 Feb 11
2
Re: [PATCH 2/5] macosx: Add definition of program_name for gnulib
...There might be another > >> OS that trips over this, after all. > > > > But it would fix it for Mac OS X, which is better than nothing. > > > > As a test, can you see if adding some variation of: > > > > #if /* this is Mac OS X */ > > #define program_name (((char **)*_NSGetArgv())[0]) > > #endif > > > > to libguestfs's gnulib/lib/error.h fixes the problem? > > > > It'll save you a lot of time if it does work. > > It compiles and libguestfs-test-tool doesn't bomb afterwards, if that > is a suffic...
2015 Feb 09
0
Re: [PATCH 2/5] macosx: Add definition of program_name for gnulib
On 9 February 2015 at 13:10, Daniel P. Berrange <berrange@redhat.com> wrote: > On Mon, Feb 09, 2015 at 11:06:16AM +0000, Margaret Lewicka wrote: >> gnulib's error.c requires program_name to be externally defined >> for !_LIBC systems. This defines program_name for Darwin only. >> --- >> configure.ac | 3 +++ >> src/Makefile.am | 6 ++++++ >> src/program_name.c | 4 ++++ >> 3 files changed, 13 insertions(+) >> create mode 100644 s...
2014 Mar 20
5
[PATCH 1/3] builder/virt-index-validate: try to cleanup in any occasion
...arse (&context, in) != 0) { - fprintf (stderr, _("%s: '%s' could not be validated, see errors above\n"), + ret = do_parse (&context, in); + + if (fclose (in) == EOF) { + fprintf (stderr, _("%s: %s: error closing input file: %m (ignored)\n"), program_name, input); - exit (EXIT_FAILURE); } - if (fclose (in) == EOF) { - fprintf (stderr, _("%s: %s: error reading input file: %m\n"), + if (ret != 0) { + parse_context_free (&context); + fprintf (stderr, _("%s: '%s' could not be validated, see errors above\n&qu...
2015 Feb 11
2
Re: [PATCH 2/5] macosx: Add definition of program_name for gnulib
On Wed, Feb 11, 2015 at 07:20:33PM +0000, Margaret Lewicka wrote: > On 11 February 2015 at 13:46, Richard W.M. Jones <rjones@redhat.com> wrote: > [...] > > On non-glibc, error.c says: > > > > /* The calling program should define program_name and set it to the > > name of the executing program. */ > > extern char *program_name; > > > > This indicates to me that we shouldn't define `program_name' as a symbol > > in libguestfs. Instead every libguestfs-using program should define > > it...
2009 Nov 26
1
[PATCH] daemon: program_name must be defined for Gnulib error module.
...t stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top -------------- next part -------------- >From 42407dd684bf9abaa046eb173de8dad4f2f80419 Mon Sep 17 00:00:00 2001 From: Richard Jones <rjones at redhat.com> Date: Thu, 26 Nov 2009 13:23:56 +0000 Subject: [PATCH] daemon: program_name must be defined for Gnulib error module. --- daemon/guestfsd.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index c67503e..b525db5 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -114,6 +114,9 @@ winsock_init (void) co...
2015 Feb 12
0
[PATCH] gnulib: Define argv[0] as program_name for error.c on Darwin
--- lib/error.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/error.c b/lib/error.c index 6683197..36a3db7 100644 --- a/lib/error.c +++ b/lib/error.c @@ -113,9 +113,13 @@ int strerror_r (); # endif # endif +#if defined __APPLE__ && defined __MACH__ +#define program_name (((char **)*_NSGetArgv())[0]) +#else /* The calling program should define program_name and set it to the name of the executing program. */ extern char *program_name; +#endif # if HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r -- 1.9.3
2015 Feb 12
2
Re: [PATCH] gnulib: Define argv[0] as program_name for error.c on Darwin
..., 4 insertions(+) > > diff --git a/lib/error.c b/lib/error.c > index 6683197..36a3db7 100644 > --- a/lib/error.c > +++ b/lib/error.c > @@ -113,9 +113,13 @@ int strerror_r (); > # endif > # endif > > +#if defined __APPLE__ && defined __MACH__ > +#define program_name (((char **)*_NSGetArgv())[0]) > +#else > /* The calling program should define program_name and set it to the > name of the executing program. */ > extern char *program_name; > +#endif > > # if HAVE_STRERROR_R || defined strerror_r > # define __strerror_r strerror...
2008 Sep 01
0
Feature request: preallocation of directories
...define EXT2FS_ATTR(x) #endif #ifndef S_ISLNK /* So we can compile even with gcc-warn */ # ifdef __S_IFLNK # define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK) # else # define S_ISLNK(mode) 0 # endif #endif #include "et/com_err.h" #include "e2p/e2p.h" static const char * program_name = "copy_dirstruct"; #ifdef _LFS64_LARGEFILE #define LSTAT lstat64 #define STRUCT_STAT struct stat64 #else #define LSTAT lstat #define STRUCT_STAT struct stat #endif const char *dest_dir = "/mnt"; const char *src_dir = "/"; int blocksize = 4096; int dest_len = 4; in...
2002 Oct 23
3
How to pipe debugmsg to a file?
Is there a wine option to send the log output to a file? I'm doing the following: wineconsole --debugmsg +all program_name parm1 parm2 parm3 > /mylog.txt mylog.txt is not receiving a copy of the millions, nay billions!, of messages output. I'm using Redhat 7.3 and the 10/07/2002 RPMs. - Bill
2015 Feb 09
11
[PATCH 1/5] macosx: Add required third parameter for xdrproc_t callbacks
>From Apple's xdr.h: "If your code invokes an xdrproc_t callback, it must be modified to pass a third parameter, which may simply be zero." --- src/proto.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/proto.c b/src/proto.c index 92ae84d..57f4882 100644 --- a/src/proto.c +++ b/src/proto.c @@ -252,7 +252,12 @@ guestfs___send (guestfs_h *g, int proc_nr, *
2019 Aug 30
0
[nbdkit PATCH 2/9] server: Consolidate common backend tasks into new backend.c
...debug ("registering %s %s", type, filename); +} + +void +backend_set_name (struct backend *b, const char *name, const char *type) +{ + size_t i, len; + + /* name is required. */ + if (name == NULL) { + fprintf (stderr, "%s: %s: %s must have a .name field\n", + program_name, b->filename, type); + exit (EXIT_FAILURE); + } + + len = strlen (name); + if (len == 0) { + fprintf (stderr, "%s: %s: %s.name field must not be empty\n", + program_name, b->filename, type); + exit (EXIT_FAILURE); + } + for (i = 0; i < len; ++i) { + u...
2006 Jan 28
8
how to pass search parameters to pagination links
I have a search page with a text_field as below <%= text_field ''program'', ''program_name'' %> After I perform the search in my controller I go to a search results view which shows search results and uses Rails pagination. Now how to pass the search paramters (i.e. params[:program][:program_name] in my controller) to the pagination links (next and previous) in my search...
2016 Sep 08
0
[PATCH 3/3] daemon: drop program_name definition
...d0..85ce5d2 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -125,9 +125,6 @@ int autosync_umount = 1; /* If set, we are testing the daemon as part of the libguestfs tests. */ int test_mode = 0; -/* Not used explicitly, but required by the gnulib 'error' module. */ -const char *program_name = "guestfsd"; - /* Name of the virtio-serial channel. */ #define VIRTIO_SERIAL_CHANNEL "/dev/virtio-ports/org.libguestfs.channel.0" -- 2.7.4