From 3fc2dee298be56dc9d74c062b9816810c8b8db69f87d02ea1da9163bda8a46ea Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 2 Jul 2007 14:48:53 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/quota?expand=0&rev=5 --- quota-3.14.9-type.patch | 157 +++++++++++++++++++++++++++++++++++++++- quota.changes | 5 ++ quota.spec | 6 +- 3 files changed, 165 insertions(+), 3 deletions(-) diff --git a/quota-3.14.9-type.patch b/quota-3.14.9-type.patch index 8ee845c..f91d1e8 100644 --- a/quota-3.14.9-type.patch +++ b/quota-3.14.9-type.patch @@ -1,3 +1,129 @@ +--- quota.c ++++ quota.c +@@ -198,7 +198,7 @@ + } + else { + if (bover) +- sprintf(timebuf, "%Lu", (long long unsigned int)q->dq_dqb.dqb_btime); ++ sprintf(timebuf, "%llu", (long long unsigned int)q->dq_dqb.dqb_btime); + else + strcpy(timebuf, "0"); + } +@@ -216,7 +216,7 @@ + } + else { + if (iover) +- sprintf(timebuf, "%Lu", (long long unsigned int)q->dq_dqb.dqb_itime); ++ sprintf(timebuf, "%llu", (long long unsigned int)q->dq_dqb.dqb_itime); + else + strcpy(timebuf, "0"); + } +--- quota_nld.c ++++ quota_nld.c +@@ -237,12 +237,12 @@ + } + } + if (!max_atime) { +- errstr(_("Failed to find tty of user %Lu to report warning to.\n"), (unsigned long long)warn->caused_id); ++ errstr(_("Failed to find tty of user %llu to report warning to.\n"), (unsigned long long)warn->caused_id); + return; + } + fd = open(max_dev, O_WRONLY); + if (fd < 0) { +- errstr(_("Failed to open tty %s of user %Lu to report warning.\n"), dev, (unsigned long long)warn->caused_id); ++ errstr(_("Failed to open tty %s of user %llu to report warning.\n"), dev, (unsigned long long)warn->caused_id); + return; + } + id2name(warn->excess_id, warn->qtype, user); +@@ -274,7 +274,7 @@ + } + sprintf(warnbuf, "%s: %s %s %s.\r\n", level, type2name(warn->qtype), user, msg); + if (write_all(fd, warnbuf, strlen(warnbuf)) < 0) +- errstr(_("Failed to write quota message for user %Lu to %s: %s\n"), (unsigned long long)warn->caused_id, dev, strerror(errno)); ++ errstr(_("Failed to write quota message for user %llu to %s: %s\n"), (unsigned long long)warn->caused_id, dev, strerror(errno)); + close(fd); + } + +--- quotacheck.c ++++ quotacheck.c +@@ -553,7 +553,7 @@ + if (gcheck) + add_to_quota(GRPQUOTA, st.st_ino, st.st_uid, st.st_gid, st.st_mode, + st.st_nlink, qspace, 1); +- debug(FL_DEBUG, _("\tAdding %s size %Ld ino %d links %d uid %u gid %u\n"), de->d_name, ++ debug(FL_DEBUG, _("\tAdding %s size %lld ino %d links %d uid %u gid %u\n"), de->d_name, + (long long)st.st_size, (int)st.st_ino, (int)st.st_nlink, (int)st.st_uid, (int)st.st_gid); + files_done++; + } +--- quotacheck_v2.c ++++ quotacheck_v2.c +@@ -158,7 +158,7 @@ + if (flags & FL_GUESSDQ) { + if (!(flags & (FL_DEBUG | FL_VERBOSE))) + fputc('\n', stderr); +- errstr(_("Found more structures for ID %u. Using values: BHARD: %Ld BSOFT: %Ld IHARD: %Ld ISOFT: %Ld\n"), ++ errstr(_("Found more structures for ID %u. Using values: BHARD: %lld BSOFT: %lld IHARD: %lld ISOFT: %lld\n"), + (uint) id, (long long)fdq->dqb_bhardlimit, (long long)fdq->dqb_bsoftlimit, + (long long)fdq->dqb_ihardlimit, (long long)fdq->dqb_isoftlimit); + return 0; +@@ -166,7 +166,7 @@ + else if (flags & FL_INTERACTIVE) { + if (!(flags & (FL_DEBUG | FL_VERBOSE))) + fputc('\n', stderr); +- errstr(_("Found more structures for ID %u. Values: BHARD: %Ld/%Ld BSOFT: %Ld/%Ld IHARD: %Ld/%Ld ISOFT: %Ld/%Ld\n"), ++ errstr(_("Found more structures for ID %u. Values: BHARD: %lld/%Ld BSOFT: %lld/%lld IHARD: %lld/%lld ISOFT: %lld/%lld\n"), + (uint) id, (long long)fdq->dqb_bhardlimit, (long long)mdq.dqb_bhardlimit, + (long long)fdq->dqb_bsoftlimit, (long long)mdq.dqb_bsoftlimit, + (long long)fdq->dqb_ihardlimit, (long long)mdq.dqb_ihardlimit, +--- quotaio_xfs.c ++++ quotaio_xfs.c +@@ -274,7 +274,7 @@ + if (info->qs_uquota.qfs_ino == -1 || info->qs_uquota.qfs_ino == 0) + printf(_("Inode: none\n")); + else +- printf(_("Inode: #%Lu (%Lu blocks, %u extents)\n"), ++ printf(_("Inode: #%llu (%llu blocks, %u extents)\n"), + (unsigned long long)info->qs_uquota.qfs_ino, + (unsigned long long)info->qs_uquota.qfs_nblks, + info->qs_uquota.qfs_nextents); +@@ -283,7 +283,7 @@ + if (info->qs_gquota.qfs_ino == -1) + printf(_("Inode: none\n")); + else +- printf(_("Inode: #%Lu (%Lu blocks, %u extents)\n"), ++ printf(_("Inode: #%llu (%llu blocks, %u extents)\n"), + (unsigned long long)info->qs_gquota.qfs_ino, + (unsigned long long)info->qs_gquota.qfs_nblks, + info->qs_gquota.qfs_nextents); +--- quotaops.c ++++ quotaops.c +@@ -266,7 +266,7 @@ + _(" Filesystem blocks soft hard inodes soft hard\n")); + + for (q = qlist; q; q = q->dq_next) { +- fprintf(fd, " %-24s %10Lu %10Lu %10Lu %10Lu %8Lu %8Lu\n", ++ fprintf(fd, " %-24s %10llu %10llu %10llu %10llu %8llu %8llu\n", + q->dq_h->qh_quotadev, + (long long)toqb(q->dq_dqb.dqb_curspace), + (long long)q->dq_dqb.dqb_bsoftlimit, +@@ -344,7 +344,7 @@ + fgets(line, sizeof(line), fd); + + while (fgets(line, sizeof(line), fd)) { +- cnt = sscanf(line, "%s %Lu %Lu %Lu %Lu %Lu %Lu", ++ cnt = sscanf(line, "%s %llu %llu %llu %llu %llu %llu", + fsp, &blocks, &bsoft, &bhard, &inodes, &isoft, &ihard); + + if (cnt != 7) { +@@ -384,7 +384,7 @@ + return -1; + } + +- cnt = sscanf(cp, _("\tinodes in use: %Lu, limits (soft = %Lu, hard = %Lu)"), ++ cnt = sscanf(cp, _("\tinodes in use: %llu, limits (soft = %llu, hard = %llu)"), + &inodes, &isoft, &ihard); + if (cnt != 3) { + errstr(_("%s - %s -- bad format\n"), --- quotasys.c +++ quotasys.c @@ -367,10 +367,10 @@ @@ -11,5 +137,34 @@ - sprintf(buf, "%Lu", (unsigned long long)space); + sprintf(buf, "%llu", (unsigned long long)space); } - + /* +@@ -385,7 +385,7 @@ + if (format) + for (i = 4, div = 1000000000000LL; i > 0; i--, div /= 1000) + if (num >= 100*div) { +- sprintf(buf, "%Lu%c", (num+div-1) / div, suffix[i]); ++ sprintf(buf, "%llu%c", (num+div-1) / div, suffix[i]); + return; + } + sprintf(buf, "%Lu", num); +--- repquota.c ++++ repquota.c +@@ -181,7 +181,7 @@ + pname[PRINTNAMELEN] = 0; + if (entry->dqb_bsoftlimit && toqb(entry->dqb_curspace) >= entry->dqb_bsoftlimit) + if (flags & FL_RAWGRACE) +- sprintf(time, "%Lu", (unsigned long long)entry->dqb_btime); ++ sprintf(time, "%llu", (unsigned long long)entry->dqb_btime); + else + difftime2str(entry->dqb_btime, time); + else +@@ -198,7 +198,7 @@ + numbuf[0], numbuf[1], numbuf[2], time); + if (entry->dqb_isoftlimit && entry->dqb_curinodes >= entry->dqb_isoftlimit) + if (flags & FL_RAWGRACE) +- sprintf(time, "%Lu", (unsigned long long)entry->dqb_itime); ++ sprintf(time, "%llu", (unsigned long long)entry->dqb_itime); + else + difftime2str(entry->dqb_itime, time); + else diff --git a/quota.changes b/quota.changes index 8494e0d..d3e12bf 100644 --- a/quota.changes +++ b/quota.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 2 16:22:45 CEST 2007 - lmichnovic@suse.cz + +- adjusted print formatting (*type.patch) + ------------------------------------------------------------------- Thu Jun 21 18:48:24 CEST 2007 - lmichnovic@suse.cz diff --git a/quota.spec b/quota.spec index c306e1f..2e7bc6a 100644 --- a/quota.spec +++ b/quota.spec @@ -13,11 +13,11 @@ Name: quota BuildRequires: e2fsprogs-devel tcpd-devel Version: 3.14.9 -Release: 1 +Release: 3 PreReq: %insserv_prereq %fillup_prereq Autoreqprov: on Group: System/Filesystems -License: GNU General Public License (GPL) +License: GPL v2 or later URL: http://sourceforge.net/projects/linuxquota/ Summary: Disk Quota System Source: %{name}-tools-3.14.9.tar.bz2 @@ -97,6 +97,8 @@ rm -rf $RPM_BUILD_ROOT %{_sbindir}/* %changelog +* Mon Jul 02 2007 - lmichnovic@suse.cz +- adjusted print formatting (*type.patch) * Thu Jun 21 2007 - lmichnovic@suse.cz - rewritten headers of init scripts to fulfill LSB (quota-SUSE.tar.bz2); obsoletes patch lsb