-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5194 from ognevny/update-util-linux
util-linux: update to 2.40.2
- Loading branch information
Showing
20 changed files
with
421 additions
and
247 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- origsrc/util-linux-2.33.1/configure.ac 2024-01-23 22:58:06.478114400 -0800 | ||
+++ src/util-linux-2.33.1/configure.ac 2024-01-23 23:51:03.975479300 -0800 | ||
@@ -1290,7 +1290,6 @@ AC_ARG_ENABLE([fallocate], | ||
[], [UL_DEFAULT_ENABLE([fallocate], [check])] | ||
) | ||
UL_BUILD_INIT([fallocate]) | ||
-UL_REQUIRES_LINUX([fallocate]) | ||
UL_REQUIRES_SYSCALL_CHECK([fallocate], [UL_CHECK_SYSCALL([fallocate])]) | ||
AM_CONDITIONAL([BUILD_FALLOCATE], [test "x$build_fallocate" = xyes]) | ||
|
||
--- origsrc/util-linux-2.39.3/sys-utils/fallocate.c 2023-12-01 03:25:16.021047300 -0800 | ||
+++ src/util-linux-2.39.3/sys-utils/fallocate.c 2024-03-07 22:10:21.660207700 -0800 | ||
@@ -417,21 +417,22 @@ int main(int argc, char **argv) | ||
if (verbose) { | ||
char *str = size_to_human_string(SIZE_SUFFIX_3LETTER | SIZE_SUFFIX_SPACE, length); | ||
|
||
+ uintmax_t ulength = (uintmax_t) length; | ||
if (mode & FALLOC_FL_PUNCH_HOLE) | ||
fprintf(stdout, _("%s: %s (%ju bytes) hole created.\n"), | ||
- filename, str, length); | ||
+ filename, str, ulength); | ||
else if (mode & FALLOC_FL_COLLAPSE_RANGE) | ||
fprintf(stdout, _("%s: %s (%ju bytes) removed.\n"), | ||
- filename, str, length); | ||
+ filename, str, ulength); | ||
else if (mode & FALLOC_FL_INSERT_RANGE) | ||
fprintf(stdout, _("%s: %s (%ju bytes) inserted.\n"), | ||
- filename, str, length); | ||
+ filename, str, ulength); | ||
else if (mode & FALLOC_FL_ZERO_RANGE) | ||
fprintf(stdout, _("%s: %s (%ju bytes) zeroed.\n"), | ||
- filename, str, length); | ||
+ filename, str, ulength); | ||
else | ||
fprintf(stdout, _("%s: %s (%ju bytes) allocated.\n"), | ||
- filename, str, length); | ||
+ filename, str, ulength); | ||
free(str); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- origsrc/util-linux-2.39.3/include/blkdev.h 2023-11-21 00:46:50.040993300 -0800 | ||
+++ src/util-linux-2.39.3/include/blkdev.h 2024-03-06 21:49:24.330239000 -0800 | ||
@@ -23,6 +23,10 @@ | ||
|
||
#define DEFAULT_SECTOR_SIZE 512 | ||
|
||
+#ifdef __CYGWIN__ | ||
+#include <cygwin/fs.h> | ||
+#endif | ||
+ | ||
#ifdef __linux__ | ||
/* very basic ioctls, should be available everywhere */ | ||
# ifndef BLKROSET | ||
--- origsrc/util-linux-2.39.3/include/ttyutils.h 2023-12-01 03:25:15.854048300 -0800 | ||
+++ src/util-linux-2.39.3/include/ttyutils.h 2024-03-07 02:05:32.567596700 -0800 | ||
@@ -164,7 +164,11 @@ static inline void reset_virtual_console | ||
tp->c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | \ | ||
NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY); | ||
tp->c_lflag |= (ISIG | ICANON | IEXTEN | ECHO|ECHOE|ECHOK|ECHOKE|ECHOCTL); | ||
+#ifdef ECHOPRT | ||
tp->c_lflag &= ~(ECHONL|ECHOPRT | NOFLSH | TOSTOP); | ||
+#else | ||
+ tp->c_lflag &= ~(ECHONL| NOFLSH | TOSTOP); | ||
+#endif | ||
|
||
if ((flags & UL_TTY_KEEPCFLAGS) == 0) { | ||
tp->c_cflag |= (CREAD | CS8 | HUPCL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- origsrc/util-linux-2.39.3/configure.ac 2024-03-06 22:38:09.882861600 -0800 | ||
+++ src/util-linux-2.39.3/configure.ac 2024-03-07 01:27:42.682134800 -0800 | ||
@@ -2367,7 +2367,7 @@ AC_ARG_ENABLE([more], | ||
) | ||
UL_BUILD_INIT([more]) | ||
UL_REQUIRES_HAVE([more], [ncursesw, ncurses], [ncursesw or ncurses libraries]) | ||
-UL_REQUIRES_LINUX([more]) | ||
+# Cygwin OK here too! UL_REQUIRES_LINUX([more]) | ||
AM_CONDITIONAL([BUILD_MORE], [test "x$build_more" = xyes]) | ||
|
||
|
||
--- origsrc/util-linux-2.39.3/text-utils/more.c 2023-12-01 03:25:16.037047200 -0800 | ||
+++ src/util-linux-2.39.3/text-utils/more.c 2024-03-07 02:29:48.127056400 -0800 | ||
@@ -57,7 +57,9 @@ | ||
#include <sys/ioctl.h> | ||
#include <sys/stat.h> | ||
#include <sys/file.h> | ||
-#include <sys/ttydefaults.h> | ||
+#ifdef HAVE_SYS_TTYDEFAULTS_H | ||
+# include <sys/ttydefaults.h> | ||
+#endif | ||
#include <sys/wait.h> | ||
#include <regex.h> | ||
#include <assert.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- origsrc/util-linux-2.39.3/tests/helpers/test_tiocsti.c 2023-11-21 00:46:50.245992100 -0800 | ||
+++ src/util-linux-2.39.3/tests/helpers/test_tiocsti.c 2024-03-06 22:26:34.506716700 -0800 | ||
@@ -11,6 +11,7 @@ | ||
|
||
int main(void) | ||
{ | ||
+#ifdef TIOCSTI | ||
int rc = 0; | ||
char *cmd = "id -u -n\n"; | ||
|
||
@@ -18,4 +19,7 @@ int main(void) | ||
rc += ioctl(0, TIOCSTI, cmd++); | ||
|
||
exit(rc ? EXIT_FAILURE : EXIT_SUCCESS); | ||
+#else | ||
+ return 77; | ||
+#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- origsrc/util-linux-2.40.2/term-utils/agetty.c 2024-07-04 00:54:41.396241100 -0700 | ||
+++ src/util-linux-2.40.2/term-utils/agetty.c 2024-10-24 21:24:07.465151300 -0700 | ||
@@ -83,7 +83,7 @@ | ||
#ifdef __linux__ | ||
# include <sys/kd.h> | ||
# define USE_SYSLOG | ||
-#elif defined(__GNU__) | ||
+#elif defined(__GNU__) || defined(__CYGWIN__) | ||
# define USE_SYSLOG | ||
#endif | ||
|
||
@@ -1029,7 +1029,9 @@ static void update_utmp(struct options * | ||
ut.ut_tv.tv_sec = t; | ||
ut.ut_type = LOGIN_PROCESS; | ||
ut.ut_pid = pid; | ||
+#ifndef __CYGWIN__ | ||
ut.ut_session = sid; | ||
+#endif | ||
|
||
pututxline(&ut); | ||
endutxent(); | ||
@@ -1101,8 +1103,12 @@ static void open_tty(const char *tty, st | ||
|
||
if (op->flags & F_HANGUP) { | ||
|
||
+#ifdef TIOCNOTTY | ||
if (ioctl(fd, TIOCNOTTY)) | ||
debug("TIOCNOTTY ioctl failed\n"); | ||
+#else | ||
+ setsid(); | ||
+#endif | ||
|
||
/* | ||
* Let's close all file descriptors before vhangup | ||
@@ -2349,11 +2355,11 @@ static void termio_final(struct options | ||
tp->c_cc[VQUIT] = DEF_QUIT; | ||
tp->c_cc[VEOF] = DEF_EOF; | ||
tp->c_cc[VEOL] = DEF_EOL; | ||
-#ifdef __linux__ | ||
+#if defined(__linux__) || defined(__CYGWIN__) | ||
tp->c_cc[VSWTC] = DEF_SWITCH; | ||
#elif defined(VSWTCH) | ||
tp->c_cc[VSWTCH] = DEF_SWITCH; | ||
-#endif /* __linux__ */ | ||
+#endif /* __linux__ || __CYGWIN__ */ | ||
|
||
/* Account for special characters seen in input. */ | ||
if (cp->eol == CR) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- origsrc/util-linux-2.40.2/configure.ac 2025-02-02 18:00:40.679521900 -0800 | ||
+++ src/util-linux-2.40.2/configure.ac 2025-02-02 18:08:21.224583300 -0800 | ||
@@ -2225,8 +2225,9 @@ UL_REQUIRES_HAVE([scriptlive], [pty], [o | ||
AM_CONDITIONAL([BUILD_SCRIPTLIVE], [test "x$build_scriptlive" = xyes]) | ||
|
||
|
||
-UL_BUILD_INIT([col], [check]) | ||
-UL_REQUIRES_COMPILE([col], [#include <limits.h>], [__GLIBC__], [building for glibc]) | ||
+UL_BUILD_INIT([col], [yes]) | ||
+#Cygwin OK here too! UL_BUILD_INIT([col], [check]) | ||
+#Cygwin OK here too! UL_REQUIRES_COMPILE([col], [#include <limits.h>], [__GLIBC__], [building for glibc]) | ||
AM_CONDITIONAL([BUILD_COL], [test "x$build_col" = xyes]) | ||
|
||
UL_BUILD_INIT([colcrt], [yes]) |
Oops, something went wrong.