33 Commits

Author SHA1 Message Date
Susant Sahani
da0239382a fish: Use size_t instead of int for iteration over an array
Signed-off-by: Susant Sahani <ssahani@redhat.com>
2025-11-18 16:44:25 +00:00
Susant Sahani
f057044480 fish: Use size_t instead of int for iteration over an array
Signed-off-by: Susant Sahani <ssahani@redhat.com>
2025-11-13 16:59:48 +00:00
Richard W.M. Jones
72cfaff5c5 Update copyright dates for 2025
Automated using this command:

perl -pi.bak -e 's/(20[012][0-9])-20[12][01234]/$1-2025/g' `git ls-files`
2025-02-16 17:00:46 +00:00
Richard W.M. Jones
e2c7bddf10 Update copyright dates for 2023
Run this command across the source:

  perl -pi.bak -e 's/(20[012][0-9])-20[12][012]/$1-2023/g' `git ls-files`

and remove changes to po{,-docs}/*.po{,t} (these will be regenerated
later when we run 'make dist').
2023-02-07 10:50:48 +00:00
Richard W.M. Jones
0e17236d7d Update copyright dates to 2020. 2020-03-06 19:32:32 +00:00
Richard W.M. Jones
05d4fcb64d Update copyright dates for 2019.
This command run over the source:

perl -pi.bak -e 's/(20[01][0-9])-2018/$1-2019/g' `git ls-files`
2019-01-08 11:58:30 +00:00
Richard W.M. Jones
212762c593 Update copyright dates for 2018.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2017/$1-2018/g' `git ls-files`
2018-01-04 15:30:10 +00:00
Pino Toscano
55bf7de97c Update copyright dates for 2017
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2016/$1-2017/g' `git ls-files`

(Thanks Rich for the perl snippet, as used in past years.)
2017-01-03 16:48:21 +01:00
Richard W.M. Jones
d5a8f82887 Use 'const' for stack integers where possible.
May improve optimization possibilities in a few cases.
2016-07-26 10:43:45 +01:00
Richard W.M. Jones
ea71e00d1a fish: Add internal documentation to several files. 2016-05-08 20:59:36 +01:00
Richard W.M. Jones
307c83177c Update copyright dates for 2016.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2015/$1-2016/g' `git ls-files`
2016-01-02 21:19:51 +00:00
Pino Toscano
5efce8c56d fish: use copy-in and copy-out
Simply the copy-in & copy-out commands of guestfish using the new
implementations of copy-in & copy-out in the library.
2015-02-02 18:44:52 +00:00
Richard W.M. Jones
c5800dc97d Update copyright dates for 2015. 2015-01-17 09:08:15 +00:00
Richard W.M. Jones
6c971faecf Update copyright dates for 2014. 2014-01-02 16:53:34 +00:00
Richard W.M. Jones
b1919066ca Initialize CLEANUP_* stack variables with NULL in various places.
Code like:

  CLEANUP_FREE char *buf;
  /* some code which might return early */
  buf = malloc (10);

is a potential bug because the free (*buf) might be called when buf is
an uninitialized pointer.  Initialize buf = NULL to avoid this.

Several of these are bugs, most are not bugs (because there is no
early return statement before the variable gets initialized).

However the compiler can elide the initialization, and even if it does
not the performance "penalty" is miniscule, and correctness is better.
2013-08-22 19:48:05 +01:00
Richard W.M. Jones
abe07ce2ca "guestfish" now means the "guest filesystem shell".
Remove the word "interactive" which implies that guestfish can only
(or often) be used interactively.
2013-04-09 23:21:42 +01:00
Richard W.M. Jones
791ad3e9e6 fish: Use CLEANUP_* macros in a lot of places. 2013-02-01 16:18:42 +00:00
Richard W.M. Jones
7941f6785e fish: copy-out: Fail on some errors when creating output directory (found by Coverity).
However it's not an error if the output directory already exists.
2012-12-08 16:42:37 +00:00
Richard W.M. Jones
2383d7a78e syntax: Remove PATH_MAX-sized buffers allocated on the stack.
On Linux PATH_MAX is 4096, but on some platforms it can be much larger
or even not defined (ie. unlimited).  Therefore using a PATH_MAX-sized
stack buffer is not a great idea for portable programs.

This change removes use of PATH_MAX-sized stack-allocated buffers.

This change only applies to the library and standalone programs.
Inside the daemon, memory allocation is much more complicated so I
have not changed those (yet).

Found by 'make syntax-check'.
2012-09-15 13:01:10 +01:00
Richard W.M. Jones
2a87261dfc fish: Fix 'copy-out /' (RHBZ#845522). 2012-08-03 12:54:18 +01:00
Richard W.M. Jones
6aa95e87c1 Remove "convenience header" "gettext.h" and use <libintl.h> instead.
gettextize provides a local file called "gettext.h".  Remove this and
use <libintl.h> from glibc headers instead.

Most of this change is mechanical: #include <libintl.h> in every C
file which uses any gettext function.  But also we remove the
gettext.h file, and adjust the "_" macros.

Note that this effectively removes the ./configure --disable-nls
option, although we don't know if that ever worked.
2012-05-01 08:57:55 +01:00
Richard W.M. Jones
08840bab44 Tempus fugit.
Update all copyright dates to 2012.
2012-01-18 22:05:02 +00:00
Richard W.M. Jones
98edfac1ee copy-in/copy-out: Wait for the tar subprocess only (RHBZ#760669). 2011-12-07 12:12:35 +00:00
Matthew Booth
04ea1375c5 Update FSF address. 2011-11-08 14:43:07 +00:00
Richard W.M. Jones
5141c8fc02 fish: copy-in, copy-out, edit, more commands can use win:... prefix. 2011-04-05 20:29:05 +01:00
Richard W.M. Jones
e8ab05b12c fish: Fix typo in error message (copy-in should be copy-out). 2011-01-22 14:46:37 +00:00
Richard W.M. Jones
096f341714 Don't need to include XDR headers in <guestfs.h>.
Include the XDR headers in the internal guestfs-internal.h instead.

This is knock-on effects to several other source files which
were implicitly relying on indirectly loaded headers.
2010-11-11 23:29:46 +00:00
Richard W.M. Jones
6391d1a7cf fish: Change 'int argc' to 'size_t argc' throughout. 2010-10-21 10:50:25 +01:00
Richard W.M. Jones
0003ea2c3d generator: Generate guestfish-only commands.
The guestfish-only commands such as 'alloc' and 'edit' are
now generated from one place in the generator instead of being
spread around ad-hoc in the C code.
2010-09-18 09:38:05 +01:00
Richard Jones
513363290e syntax: Remove unused assert.h header. 2010-09-10 22:57:52 +01:00
Richard Jones
b1e65806a1 fish: const-correctness fixes in copy.c 2010-09-10 11:53:46 +01:00
Richard Jones
878c8c77d8 fish: Fix 'copy-out' command when local directory is "/foo". 2010-09-10 10:27:45 +01:00
Richard Jones
2635a9c70e fish: Implement copy-in and copy-out commands. 2010-09-09 23:12:19 +01:00