at/at-atq-timeformat.patch
Dirk Mueller 67138a99a0 Accepting request 643964 from home:kstreitova:branches:Base:System
- Version update to at 3.1.23
  * 832368-Using_of_the_meaningless_fcntl: Fix call of fcntl by
    replacing (long) 1 with FD_CLOEXEC
  * 892819-at__improvements_to_atd.service: Improve atd.service,
    see bug report 892819
  * 885891-at__stale_batchjobs_after_reboot: Remove stale at jobs
    after a boot.
  * 897669-897670-Some_fixes_in_the_manuals: Fix some warnings in
    manpages at.1 and atd.8
  * 883730-Remove_invalid_email_from_man_page: Remove invalid email
    from man pages.
  * Draft of a release script
  * Finalised script to release software.
- refresh at-atq-timeformat.patch
- refresh at-adjust_load_to_cpu_count.patch

OBS-URL: https://build.opensuse.org/request/show/643964
OBS-URL: https://build.opensuse.org/package/show/Base:System/at?expand=0&rev=106
2018-10-24 18:22:11 +00:00

93 lines
2.7 KiB
Diff

Index: at.c
===================================================================
--- at.c.orig
+++ at.c
@@ -132,9 +132,10 @@ int fcreated;
char *namep;
char atfile[] = ATJOB_DIR "/12345678901234";
-char *atinput = (char *) 0; /* where to get input from */
-char atqueue = 0; /* which queue to examine for jobs (atq) */
-char atverify = 0; /* verify time instead of queuing job */
+char *atinput = (char *) 0; /* where to get input from */
+char atqueue = 0; /* which queue to examine for jobs (atq) */
+char atverify = 0; /* verify time instead of queuing job */
+char *timeformat = TIMEFORMAT_POSIX; /* time format (atq) */
/* Function declarations */
@@ -513,7 +514,7 @@ writefile(time_t runtimer, char queue)
runtime = localtime(&runtimer);
- strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime);
+ strftime(timestr, TIMESIZE, timeformat, runtime);
fprintf(stderr, "job %ld at %s\n", jobno, timestr);
/* Signal atd, if present. Usual precautions taken... */
@@ -627,7 +628,7 @@ list_jobs(long *joblist, int len)
runtimer = 60 * (time_t) ctm;
runtime = localtime(&runtimer);
- strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime);
+ strftime(timestr, TIMESIZE, timeformat, runtime);
if ((pwd = getpwuid(buf.st_uid)))
printf("%ld\t%s %c %s\n", jobno, timestr, queue, pwd->pw_name);
@@ -824,7 +825,7 @@ main(int argc, char **argv)
*/
if (strcmp(pgm, "atq") == 0) {
program = ATQ;
- options = "hq:V";
+ options = "hq:Vo:";
} else if (strcmp(pgm, "atrm") == 0) {
program = ATRM;
options = "hV";
@@ -908,6 +909,10 @@ main(int argc, char **argv)
timer -= timer % 60;
break;
+ case 'o':
+ timeformat = optarg;
+ break;
+
default:
usage();
break;
Index: at.1.in
===================================================================
--- at.1.in.orig
+++ at.1.in
@@ -29,6 +29,8 @@ at, batch, atq, atrm \- queue, examine,
.RB [ \-V ]
.RB [ \-q
.IR queue ]
+.RB [ -o
+.IR timeformat ]
.br
.B at
.RB [ \-rd ]
@@ -260,6 +262,9 @@ Times displayed will be in the format "T
.B
\-c
cats the jobs listed on the command line to standard output.
+.TP 8
+.BI \-o " fmt"
+strftime-like time format used for the job list
.SH FILES
.I @ATJBD@
.br
Index: panic.c
===================================================================
--- panic.c.orig
+++ panic.c
@@ -96,7 +96,7 @@ usage(void)
" at [-V] [-q x] [-f file] [-mMlbv] -t time\n"
" at -c job ...\n"
" at [-V] -l [job ...]\n"
- " atq [-V] [-q x]\n"
+ " atq [-V] [-q x] [-o timeformat]\n"
" at [ -rd ] job ...\n"
" atrm [-V] job ...\n"
" batch\n");