807 Commits

Author SHA1 Message Date
Ryusuke Konishi
72b6ced51c configure.ac: do not use AC_PROG_GCC_TRADITIONAL
This macro is deprecated in autoconf 2.72.

Remove it and fix the following warning:

configure.ac:167: warning: The macro 'AC_PROG_GCC_TRADITIONAL' is obsolete.
configure.ac:167: You should run autoupdate.
./lib/autoconf/c.m4:1676: AC_PROG_GCC_TRADITIONAL is expanded from...
configure.ac:167: the top level

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2025-09-22 18:48:56 +09:00
Christopher Zimmermann
7aae659498 chcp: fix segfault
reported here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715729

Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715729
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2025-09-22 09:29:23 +09:00
Ryusuke Konishi
c9b400aa41 libnilfs: fix nilfs_open failure for mount points with escaped characters
nilfs_find_fs(), called from nilfs_open(), parses "/proc/mounts" using its
own routines, but these parsing routines have a problem in that they
cannot handle escaped path strings.  For example, if the mount point path
name contains spaces, the search will fail.

This is causing errors when running lscp, lssu, and other nilfs tools.

Fix this issue by avoiding custom parsing and using standard mount table
access routines such as setmntent(), getmntent_r(), endmntent(), and
hasmntopt().

Closes: https://github.com/nilfs-dev/nilfs-utils/issues/22
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-04-03 02:54:35 +09:00
Ryusuke Konishi
78717a83c0 libcleaner: fix asymmetry in mount table open/close handling
Although nilfs_cleaner_find_fs() uses endmntent() to close the file
descriptor for "/proc/mounts", its uses fopen() directly to open it
instead of setmntent().  This asymmetry is undesirable because it can
cause unintended problems such as lock inconsistencies.  Therefore,
properly use setmntent().

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-04-03 02:54:35 +09:00
Ryusuke Konishi
dbf8c244ce mkfs.nilfs2: do not use own type blocknr_t
The block address is now represented by uint64_t, but only mkfs.nilfs2
uses its own type "blocknr_t".

Eliminate the own type so that the bit width of variables that handle
it can be made stricter (such as when displaying).

Additionally, to avoid obscuring the meaning of "start" in identifiers
intended to be block addresses, rename them to "start_blocknr".

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-03-17 05:08:36 +09:00
Ryusuke Konishi
a34ee4f35f bin/*: correct error message for invalid long option specification
The commands under "bin/" output the error messages by themselves by
setting opterr to 0, and are compatible with getopt_long, but if
an invalid long option is specified, the option that causes the error
will not be displayed as shown below:

 lscp: invalid option --

Also lscp and lssu do not properly display error messages for options
that require an additional argument and it is not provided.

Fix these issues by not setting opterr to 0 and leaving error output
for argument options to getopt() or getopt_long()'s built-in features.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-03-03 22:12:04 +09:00
Ryusuke Konishi
5e06a9697d nilfs-{clean,resize}: fix duplicate option error output
These commands overlap the error messages output by getopt() or
getopt_long() and the error messages output by themselves when invalid
command line options are specified.

Fix this issue by removing the own error message and printing the
usage instructions instead.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-03-03 22:09:21 +09:00
Ryusuke Konishi
1003bc3c31 nilfs-resize: make the progress bar more accurate
nilfs_resize_count_inuse_segments() is used to count the segments to
be moved in order to evaluate the progress of the progress bar.
However, the current implementation counts segments whose flags are in
the reclaimable state (dirty, not active, not error), and does not
count active segments, resulting in a discrepancy.

To represent the progress bar more acculately, change the count to
literally "in-use" (dirty) segments instead of reclaimable segments.

Also, there is some confusion regarding the term "in-use" in the
description of the nilfs_resize_reclaim() function, so correct that
as well.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-03-02 23:50:52 +09:00
Ryusuke Konishi
f8b07fc9bb nilfs-resize: rename function nilfs_resize_inuse_segments()
nilfs_resize_inuse_segments() checks the sufile's segusage flags and
collects and returns the numbers of segments that are reclaimable
(dirty, not active, not error).  However, this function name is a bit
confusing, since active segments are also "in-use".

Change the function name to the more direct
nilfs_resize_reclaimable_segments() in order to treat "inuse" as meaning
that it is literally in use, including active segments.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-03-02 23:50:52 +09:00
Ryusuke Konishi
667b0f936b libnilfsgc: fix potential memory or mmap leak in nilfs_acc_blocks()
If nilfs_acc_blocks_segment() fails, nilfs_acc_blocks() returns an
error without releasing the segment allocated by nilfs_get_segment()
with nilfs_put_segment().

Fix this potential leak issue by calling nilfs_put_segment() regardless
of whether the call to nilfs_acc_blocks_segment() is successful or not.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-03-02 05:23:08 +09:00
Ryusuke Konishi
4b982f8a02 nilfs-resize: force file system update in active segment only situation
In order to shrink the file system even when there are only active
segments in the area to be truncated, force arcive segments to be
evicted by creating a file (called a balloon file) with the required
size on the root directory of the file system and then deleting it.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-29 20:57:55 +09:00
Ryusuke Konishi
7ecf160f62 nilfs-resize: allow active segment search function to return block count
Allow nilfs_resize_find_active_segments() to return the total number
of used blocks in the active segments it finds through an optional
argument.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-29 20:57:55 +09:00
Ryusuke Konishi
c93d67bea5 nilfs-resize: add and apply error message macros
Define and apply the msg() wrapper macro err(), which adds and outputs
the error cause string, and errx(), which outputs the error message
without adding the error cause.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-29 20:57:55 +09:00
Ryusuke Konishi
27e4b7046f nilfs-resize: add macro to print message when in verbose mode
Add and apply the verbose_msg() macro that prints the argument's
message when global variable "verbose" is true.

Also, shorten the name of the message output function "myprintf" for
coexistence with a progress bar to "msg".

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-29 20:57:55 +09:00
Ryusuke Konishi
cf5dab09fe libnilfs: add functions to get pathname or FD of mount point directory
Add export functions to get the absolute path name or file descriptor
of the mount point directory (file system root directory).

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-29 20:57:55 +09:00
Ryusuke Konishi
87b1c80fd0 libnilfs: nilfs_open: use last matched mount
In the current libnilfs implementation, nilfs_open() returns the first
matching mount when searching the mount table.  Therefore, when the
same mount points are stacked, the inaccessible mount point will be
unexpectedly selected.

Fix this issue by choosing the last match instead of the first one
when searching the mount table.

The changes required here also fixes potential memory leaks related to
device pathname and mount point pathname strings when nilfs_find_fs()
is called multiple times.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-28 03:04:21 +09:00
Ryusuke Konishi
b5df575125 libnilfs: nilfs_open: identify the mount point device
When nilfs_open() opens a mount point to obtain an ioctl FD, it may be
overlaid by another mount and may be a directory of a file system
mounted with a different device.

Most nilfs utilities cannot operate in situations where the mount
point is hidden, but with the current implementation, an ioctl FD is
opened for the overlying file system, and ioctl commands are issued
wrongly for it.

Fix this issue by detecting such condition and returning a ENOENT error
in that case.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-28 03:04:21 +09:00
Ryusuke Konishi
74cbae5301 mkfs.nilfs2, nilfs-resize, nilfs-tune: output error cause when open fails
mkfs.nilfs2, nilfs-resize, and nilfs-tune commands do not display the
error cause when they fail to open a nilfs2 device, so add a string
that represents the error.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-26 02:21:02 +09:00
Ryusuke Konishi
d89ecb3d71 libnilfs: fix error code when nilfs_open failed to find nilfs
In the current implementation, if nilfs_open() fails to retrieve an
existing nilfs mount from the mount table, it returns an error with
errno = ENOENT, resulting in inappropriate error messages, such as the
following:

$ lscp /dev/sdb1
lscp: cannot open NILFS on /dev/sdb1: No such file or directory

Fix this issue by changing the error code set in errno to ENXIO.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-26 02:21:01 +09:00
Ryusuke Konishi
ad10d60cd0 umount_libmount: fix error messages
libmount based umount.nilfs2 does not display the node (target)
correctly in its message on error as below:

 umount.nilfs2: (null): device is busy

Fix this issue.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-26 00:14:21 +09:00
Ryusuke Konishi
15a99ec343 mkfs.nilfs2: set block_count read-only compat flag by default
The ability to maintain per-checkpoint block count statistics was enabled
in kernel 2.6.39, and at the same time a dedicated compat flag
(NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT) was introduced to prevent this
block count from being corrupted by read/write mounts in earlier versions.

More than 12 years have passed since this flag was introduced, and there
are almost no opportunities to mount nilfs2 partitions with older kernels
of this generation (it is not recommended in the first place), so turn on
this flag for new file systems created by mkfs.nilfs2.

Note that we can use nilfs-tune command to clear or reset this flag.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-25 17:12:41 +09:00
Ryusuke Konishi
7eb742fce3 nilfs-resize: output the minimum device size in insufficient free space message
Change nilfs_resize_check_free_space() to output the required device
size instead of the total byte size of the required segments when free
space is insufficient.

This gives a guideline for the device size to be specified when
respecifying the device size and retrying shrinking.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-25 03:17:50 +09:00
Ryusuke Konishi
276d85e0c7 nilfs-resize: fix abnormal truncation when specifying size with fraction
When we specify a fractional device size for nilfs-resize command, the
device size will be abnormally truncated due to an error in size
correction calculation (missing type cast).

For example, if we specify 8,796,093,023,200 bytes (= 8TiB - 32 bytes)
as the device size for an 8TiB partition, the size will be adjusted to
512 bytes as shown below, resulting in an insufficient size error:

 $ sudo nilfs-resize /dev/loop0 8796093023200
 size 8796093023200 is not aligned to sector size. truncated to 512.
 Partition size = 8796093023232 bytes.
 Shrink the filesystem size from 8796093023232 bytes to 512 bytes.
 Error: the filesystem does not have enough free space.
        At least 10 more segments (83886080 bytes) are required.
 Aborted.

Fix this issue by inserting the missing typecast in the alignment
correction calculation.  After applying this modification, the device
size will be rounded down appropriately to the sector size as shown
below:

 $ sudo nilfs-resize /dev/loop0 8796093023200
 size 8796093023200 is not aligned to sector size. truncated to 8796093022720.
 Partition size = 8796093023232 bytes.
 Shrink the filesystem size from 8796093023232 bytes to 8796093022720 bytes.
 No segments will be truncated.
 Do you wish to proceed (y/N)? y
 Done.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-25 03:17:50 +09:00
Ryusuke Konishi
22ed5817fc nilfs-resize: fix abnormal minimum size error output for sizes less than 4KiB
If we specify a device size less than 4096 bytes, an insufficient size
error will occur, but due to an underflow in calculating the number of
segments, the output of the required number of segments and required
size will become abnormal:

 $ sudo nilfs-resize /dev/loop0 1024
 Partition size = 8796093023232 bytes.
 Shrink the filesystem size from 8796093022720 bytes to 1024 bytes.
 Error: the filesystem does not have enough free space.
        At least 18446741984637458845 more segments (922337203713998848
 bytes) are required.
 Aborted.

Fix this issue by preventing underflow when calculating the number of
segments.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-25 03:17:50 +09:00
Ryusuke Konishi
411036081c nilfs-resize: switch singular/plural forms of "segment" in message text
When outputting the number segments in messages, switch between
singular and plural forms of string "segment" depending on the count.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-25 03:17:50 +09:00
Ryusuke Konishi
0d15f76541 nilfs-tune: fix usage of wrong endian conversion macro
The nilfs-tune command's show_nilfs_sb() function, incorrectly uses
the 32-bit width conversion macro le32_to_cpu() for two 16-bit width
fields, so fix them.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-24 00:15:03 +09:00
Ryusuke Konishi
b4f54b2025 libmountchk: fix a typo in comments
Fix typo "ofr" -> "of".

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-24 00:15:03 +09:00
Ryusuke Konishi
9050e48ae0 nilfs-tune: do not display version information by default
Like other commands, add the "-V" option to display version information
and suppress output during normal execution.

Also update the manpage and help messages.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-19 19:37:14 +09:00
Ryusuke Konishi
a184151e39 mkfs.nilfs2: use libmountchk to check the mount status of target device
The current mkfs.nilfs2 device mount status check does not support
files mounted via loop devices.

Use libmountchk (check_mount) for stricter checking.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-19 19:37:14 +09:00
Ryusuke Konishi
bc4885c4ec libmountchk: determine if image file is mounted via a loop device
The check_mount() function used to check the mount of a block device
does not support determining the mount status when the source is an
image file mounted via a loop device.

As a result, nilfs-tune can rewrite the loop device mount source file
without the force option "-f".

Fix this issue by making check_mount() detect if a loop device is
attached and a file system is mounted on it.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-19 19:37:14 +09:00
Ryusuke Konishi
bc16da9dde compat.h: include the compatible definition for PATH_MAX
This moves the definition of PATH_MAX, including completions where
PATH_MAX is undefined, to "compat.h" so that it does not have to be
defined in multiple places.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-19 19:37:14 +09:00
Ryusuke Konishi
fdf9d4efac compat.h: ensure to declare major() and minor() macros
In preparation for adding a routine that searches for a backing file
from a loop device, make the major() and minor() macros available.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-19 19:37:14 +09:00
Ryusuke Konishi
a8d15f6cdb nilfs-tune: fix the exit code when mount is detected
Since the exit code when the mount is detected is the success value,
it is not possible to determine whether the program was successfully
executed or not just from the exit code.

Fix this issue by returning an error exit code when a mount is
detected on the device during the mount check performed without
the "-f" option.

Also use errx() to output the error message and adjust the message
format.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-19 19:37:14 +09:00
Ryusuke Konishi
1e84d4fb5e nilfs-tune: add missing -f option in help message
The "-f" option is missing from the help message, so add it.  Also,
organize the help message by execution examples.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-19 19:37:14 +09:00
Ryusuke Konishi
8414cbfe38 lib/sb.c: fix super block read failure from disk image file
Unlike mkfs.nilfs2, nilfs-tune and dumpseg commands will cause errors
if used directly on a disk image files.  This is because
__nilfs_sb_read(), which reads superblocks, uses the BLKGETSIZE64 ioctl
command to get the device size, which fails for disk image files.

Fix this issue by using the size information obtained from the fstat
system call for regular files.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-18 20:48:12 +09:00
Ryusuke Konishi
4d722cd3eb Make installation of kernel uapi header files optional
The bundled kernel's uapi header files ("nilfs2_ondisk.h" and
"nilfs2_api.h") are included in kernel-related development packages
in modern Linux distributions, resulting in duplicate installations.

In order to eliminate this duplication, make the installation of these
files optional and not install them by default.

The utilities will continue to refer to the included uapi header files,
and will only allow installation on the system, which can be specified
using the "--enable-uapi-header-install" option in configure file
arguments.

This is a workaround for older environments and should normally be
disabled.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-17 01:46:25 +09:00
Ryusuke Konishi
61b66f0043 Move the kernel uapi header file to "linux" subdirectory
Change the location of the uapi header files "nilfs2_ondisk.h" and
"nilfs2_api.h" to the "linux" subdirectory, as they are located in Linux
kernel-related development packages.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-17 01:39:47 +09:00
Ryusuke Konishi
08c9f4a3e4 mount_libmount: fix umount failure after remount
For nilfs2 mounts that are read-only mounted and then remounted in
read/write mode, nilfs_cleanerd will no longer be shut down by umount or
remount, and the file system will not be able to be unmounted unless the
user manually kills it.

This is because the mount root key "ROOT", which libmount needs to
identify the mount entry on utab that stores file system-specific mount
attributes, is not set by remount or fake mount.  This prevents
libmount-based mount and umount programs from correctly inheriting
cleanerd's PID, making it impossible to control cleanerd when remounting
or unmounting.

Fix this issue by searching the mount table and completing the missing
mount root with the mount entry information obtained when performing
remount or fake mount.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-13 21:53:13 +09:00
Ryusuke Konishi
1907f5bf07 mount_libmount: generalize mount entry search function
Add a general-purpose mount entry search function nilfs_find_mount(),
which makes nilfs_find_rw_mount() more general and allows the caller to
specify matching conditions for the mount point and mount options.

This is a preparation to resolve issues with cleanerd state management
in {mount,umount}_libmount.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-13 21:52:58 +09:00
Ryusuke Konishi
ade3f91ba9 nilfs-resize: fix abnormal message output when shrinking file system
Although the return value of nilfs_resize_count_inuse_segments() is type
ssize_t, nilfs_shrink_online(), which calls it, receives the return value
as a local variable of type uint64_t.

This causes the following abnormality:

1. If nilfs_resize_count_inuse_segments() returns an error, it is not
   treated as an error, and the message output assuming its success it not
   skipped.
2. An abnormal progress message like "Moving xx in-use segment(null)." is
   output during file system shrink in a 32-bit environment due to type
   mismatch.

Fix these issues by changing the type of the local variable in question to
ssize_t.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-08 15:57:28 +09:00
Ryusuke Konishi
09a82c1250 README: describe an example of separating libraries into a subdirectory
Add configuration method to install libraries into a subdirectory such as
/usr/lib64/nilfs instead of /usr/lib64.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-08 15:57:28 +09:00
Ryusuke Konishi
46b5666176 libnilfsgc, cleanerd, nilfs-resize: treat scrapped segments as unprotected
An issue exists where scrapped segments generated during recovery of
dsync blocks are incorrectly determined to be protected due to
comparisons using invalid segment summary sequence numbers on disk.

Segments that are incorrectly determined to be protected will not be
reclaimed for a long period of time, occupying disk space unnecessarily.
In addition, it may prevent nilfs-resize from shrinking the file system.

Fix these issues by using segment usage information to determine whether
a segment has been scrapped, in which case it is considered unprotected
without comparing sequence numbers.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-06 22:55:22 +09:00
Ryusuke Konishi
49fb08a048 nilfs-resize: add kernel-doc style comments to major functions
Insert kernel-doc comments before each major function to help understand
internal behavior and ease maintenance.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-06 01:33:32 +09:00
Ryusuke Konishi
647d012dcf checkpatch: fix perl errors due to unescaped left braces in regex
Fix error in checkpatch.pl errors due to use of deprecated unescaped
left braces in perl regular expressions.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2024-02-05 01:53:34 +09:00
Ryusuke Konishi
697b7f6abe nilfs-tune: fix gcc8 warnings at user_string() and group_string()
GCC 8 emits -Wstringop-truncation warnings at user_string() and
group_string().

This suppresses these warnings by explicitly writing a null character
to the last character in buffers, even if it is not computationally
necessary.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2022-06-20 01:21:25 +09:00
Ryusuke Konishi
9f2e3331a7 mkfs, nilfs-tune: fix gcc8 warnings for volume name buffers
For the volume name buffer in super blocks, we store a volume name
without a terminating null character if it is truncated to the buffer
size.

This suppresses false positive -Wstringop-truncation warnings of GCC 8
related to the volume name buffers and adds comments so as to clarify
the treatment of truncation on them.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2022-06-20 01:21:25 +09:00
Ryusuke Konishi
d70c11d445 README: remedy a note about dependency on the selinux library
The current note about dependency on the selinux library is obscure.
Clarify that libselinux-devel (or libselinux1-dev) package is not
required unless we explicitly remove the use of libmount.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2022-06-19 15:57:56 +09:00
Ryusuke Konishi
fb8051e720 nilfs-utils: bump up utility version to 2.3.0-dev
The nilfs-utils master branch is newer than v2.2.y branch, but it
looks older from the version number of utilities since it still
remains as 2.2.5.

To avoid the confusion, adjust the version number with '-dev'
pre-release suffix.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2022-06-19 11:56:12 +09:00
Ryusuke Konishi
8cb2f35b70 nilfs-utils: do not use AC_TYPE_SIGNAL and RETSIGTYPE
The AC_TYPE_SIGNAL macro is diagnosed as obsolete in Autoconf 2.70 and
later:

 configure.ac:164: warning: The macro `AC_TYPE_SIGNAL' is obsolete.
 configure.ac:164: You should run autoupdate.
 ./lib/autoconf/types.m4:776: AC_TYPE_SIGNAL is expanded from...
 configure.ac:164: the top level

AC_TYPE_SIGNAL defines the value of RETSIGTYPE macro, which will be
set to 'void' or 'int' depending on platforms.  But, in the first
place, signal handlers returning 'int' became obsolete long ago and no
modern C platforms use the legacy return type.

So, this replaces RETSIGTYPE with 'void' in codebase of nilfs-utils in
addition to removing the AC_TYPE_SIGNAL macro.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2022-06-19 03:40:48 +09:00
Ryusuke Konishi
4faf5384db configure.ac: remove obsolete AC_HEADER_TIME marco
The AC_HEADER_TIME macro is diagnosed as obsolete in Autoconf 2.70 and
later:

 configure.ac:150: warning: The macro `AC_HEADER_TIME' is obsolete.
 configure.ac:150: You should run autoupdate.
 ./lib/autoconf/headers.m4:743: AC_HEADER_TIME is expanded from...
 configure.ac:150: the top level

We don't use the result (TIME_WITH_SYS_TIME) of AC_HEADER_TIME, so
just remove the macro to fix the warning.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2022-06-19 03:40:48 +09:00