* [PATCH 1/4] script: search shell from path, when necessary
@ 2012-12-28 21:23 Sami Kerola
2012-12-28 21:23 ` [PATCH 2/4] ipcs: fix spacing in summary output Sami Kerola
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Sami Kerola @ 2012-12-28 21:23 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518532
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
term-utils/script.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/term-utils/script.c b/term-utils/script.c
index 94a20da..983930f 100644
--- a/term-utils/script.c
+++ b/term-utils/script.c
@@ -445,11 +445,17 @@ doshell(void) {
*/
signal(SIGTERM, SIG_DFL);
- if (cflg)
- execl(shell, shname, "-c", cflg, NULL);
- else
- execl(shell, shname, "-i", NULL);
-
+ if (access(shell, X_OK) == 0) {
+ if (cflg)
+ execl(shell, shname, "-c", cflg, NULL);
+ else
+ execl(shell, shname, "-i", NULL);
+ } else {
+ if (cflg)
+ execlp(shname, "-c", cflg, NULL);
+ else
+ execlp(shname, "-i", NULL);
+ }
warn(_("failed to execute %s"), shell);
fail();
}
--
1.8.0.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] ipcs: fix spacing in summary output
2012-12-28 21:23 [PATCH 1/4] script: search shell from path, when necessary Sami Kerola
@ 2012-12-28 21:23 ` Sami Kerola
2013-01-09 13:20 ` Karel Zak
2012-12-28 21:23 ` [PATCH 3/4] swapon: default to --show if nothing is requested Sami Kerola
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Sami Kerola @ 2012-12-28 21:23 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
Change 56692a6 introduced spacing error to --summary printing.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
sys-utils/ipcs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index 4422162..1e1b022 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -465,7 +465,7 @@ static void do_msg (char format, int unit)
printf (_("------ Messages Status --------\n"));
printf (_("allocated queues = %d\n"), msginfo.msgpool);
printf (_("used headers = %d\n"), msginfo.msgmap);
- ipc_print_size(unit, _("used space ="), msginfo.msgtql,
+ ipc_print_size(unit, _("used space"), msginfo.msgtql,
unit == IPC_UNIT_DEFAULT ? _(" bytes\n") : "\n", 0);
return;
}
--
1.8.0.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] swapon: default to --show if nothing is requested
2012-12-28 21:23 [PATCH 1/4] script: search shell from path, when necessary Sami Kerola
2012-12-28 21:23 ` [PATCH 2/4] ipcs: fix spacing in summary output Sami Kerola
@ 2012-12-28 21:23 ` Sami Kerola
2013-01-09 13:21 ` Karel Zak
2012-12-28 21:23 ` [PATCH 4/4] losetup: fix declarations [smatch scan] Sami Kerola
2013-01-09 12:47 ` [PATCH 1/4] script: search shell from path, when necessary Karel Zak
3 siblings, 1 reply; 8+ messages in thread
From: Sami Kerola @ 2012-12-28 21:23 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
Proposed-by: Karel Zak <kzak@redhat.com>
References: http://www.spinics.net/lists/util-linux-ng/msg07301.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
sys-utils/swapon.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
index 176be42..7310767 100644
--- a/sys-utils/swapon.c
+++ b/sys-utils/swapon.c
@@ -786,7 +786,7 @@ int main(int argc, char *argv[])
}
argv += optind;
- if (show) {
+ if (show || (!all && !numof_labels() && !numof_uuids() && *argv == NULL)) {
if (!ncolumns) {
/* default columns */
columns[ncolumns++] = COL_PATH;
@@ -799,9 +799,6 @@ int main(int argc, char *argv[])
return status;
}
- if (!all && !numof_labels() && !numof_uuids() && *argv == NULL)
- usage(stderr);
-
if (ifexists && !all)
usage(stderr);
--
1.8.0.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] losetup: fix declarations [smatch scan]
2012-12-28 21:23 [PATCH 1/4] script: search shell from path, when necessary Sami Kerola
2012-12-28 21:23 ` [PATCH 2/4] ipcs: fix spacing in summary output Sami Kerola
2012-12-28 21:23 ` [PATCH 3/4] swapon: default to --show if nothing is requested Sami Kerola
@ 2012-12-28 21:23 ` Sami Kerola
2013-01-09 13:36 ` Karel Zak
2013-01-09 12:47 ` [PATCH 1/4] script: search shell from path, when necessary Karel Zak
3 siblings, 1 reply; 8+ messages in thread
From: Sami Kerola @ 2012-12-28 21:23 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
sys-utils/losetup.c:309:2: error: 'for' loop initial declarations are only allowed in C99 mode
sys-utils/losetup.c:374:2: error: 'for' loop initial declarations are only allowed in C99 mode
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
sys-utils/losetup.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
index 2765a38..2c81e69 100644
--- a/sys-utils/losetup.c
+++ b/sys-utils/losetup.c
@@ -302,11 +302,12 @@ static int make_table(struct loopdev_cxt *lc, const char *file,
{
struct stat sbuf, *st = &sbuf;
struct tt_line *ln;
+ int i;
if (!(tt = tt_new_table(0)))
errx(EXIT_FAILURE, _("failed to initialize output table"));
- for (int i = 0; i < ncolumns; i++) {
+ for (i = 0; i < ncolumns; i++) {
struct colinfo *ci = get_column_info(i);
if (!tt_define_column(tt, ci->name, ci->whint, ci->flags))
@@ -341,6 +342,8 @@ static int make_table(struct loopdev_cxt *lc, const char *file,
static void usage(FILE *out)
{
+ size_t i;
+
fputs(USAGE_HEADER, out);
fprintf(out,
@@ -371,7 +374,7 @@ static void usage(FILE *out)
fputs(USAGE_VERSION, out);
fputs(_("\nAvailable --list columns:\n"), out);
- for (size_t i = 0; i < NCOLS; i++)
+ for (i = 0; i < NCOLS; i++)
fprintf(out, " %12s %s\n", infos[i].name, _(infos[i].help));
fprintf(out, USAGE_MAN_TAIL("losetup(8)"));
--
1.8.0.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] script: search shell from path, when necessary
2012-12-28 21:23 [PATCH 1/4] script: search shell from path, when necessary Sami Kerola
` (2 preceding siblings ...)
2012-12-28 21:23 ` [PATCH 4/4] losetup: fix declarations [smatch scan] Sami Kerola
@ 2013-01-09 12:47 ` Karel Zak
3 siblings, 0 replies; 8+ messages in thread
From: Karel Zak @ 2013-01-09 12:47 UTC (permalink / raw)
To: Sami Kerola; +Cc: util-linux
On Fri, Dec 28, 2012 at 09:23:40PM +0000, Sami Kerola wrote:
> Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518532
> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
> ---
> term-utils/script.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
Hmm... not sure, but I have not found any strong argument, so applied
:-) Thanks.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] ipcs: fix spacing in summary output
2012-12-28 21:23 ` [PATCH 2/4] ipcs: fix spacing in summary output Sami Kerola
@ 2013-01-09 13:20 ` Karel Zak
0 siblings, 0 replies; 8+ messages in thread
From: Karel Zak @ 2013-01-09 13:20 UTC (permalink / raw)
To: Sami Kerola; +Cc: util-linux
On Fri, Dec 28, 2012 at 09:23:41PM +0000, Sami Kerola wrote:
> sys-utils/ipcs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/4] swapon: default to --show if nothing is requested
2012-12-28 21:23 ` [PATCH 3/4] swapon: default to --show if nothing is requested Sami Kerola
@ 2013-01-09 13:21 ` Karel Zak
0 siblings, 0 replies; 8+ messages in thread
From: Karel Zak @ 2013-01-09 13:21 UTC (permalink / raw)
To: Sami Kerola; +Cc: util-linux
On Fri, Dec 28, 2012 at 09:23:42PM +0000, Sami Kerola wrote:
> sys-utils/swapon.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] losetup: fix declarations [smatch scan]
2012-12-28 21:23 ` [PATCH 4/4] losetup: fix declarations [smatch scan] Sami Kerola
@ 2013-01-09 13:36 ` Karel Zak
0 siblings, 0 replies; 8+ messages in thread
From: Karel Zak @ 2013-01-09 13:36 UTC (permalink / raw)
To: Sami Kerola; +Cc: util-linux
On Fri, Dec 28, 2012 at 09:23:43PM +0000, Sami Kerola wrote:
> sys-utils/losetup.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
[...]
> - for (int i = 0; i < ncolumns; i++) {
> + for (i = 0; i < ncolumns; i++) {
Ah yes, we hate this... Applied, thanks.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-01-09 13:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 21:23 [PATCH 1/4] script: search shell from path, when necessary Sami Kerola
2012-12-28 21:23 ` [PATCH 2/4] ipcs: fix spacing in summary output Sami Kerola
2013-01-09 13:20 ` Karel Zak
2012-12-28 21:23 ` [PATCH 3/4] swapon: default to --show if nothing is requested Sami Kerola
2013-01-09 13:21 ` Karel Zak
2012-12-28 21:23 ` [PATCH 4/4] losetup: fix declarations [smatch scan] Sami Kerola
2013-01-09 13:36 ` Karel Zak
2013-01-09 12:47 ` [PATCH 1/4] script: search shell from path, when necessary Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox