Bug#425421: di: -t changes -sn to -ss

2007-05-29 Thread Michael Ablassmeier
tags 425421 + upstream
thanks

hi,

On Mon, May 21, 2007 at 08:26:12AM -0700, Bill Brelsford wrote:
 The command di -sn leaves the output unsorted (in mtab order).
 But di -sn -t, while correctly adding a totals line, also sorts
 the output by special device name (as if called with di -ss -t).
 
 This problem does not occur in etch (4.9.dfsg.1-1).

hm.. im not sure if this is a bug or a feature ;)

  if ((flags  DI_F_TOTAL) == DI_F_TOTAL 
  (flags  DI_F_NO_HEADER) != DI_F_NO_HEADER)
  {
  /* in order to find the main pool entry,*/
  /* we must have the array sorted by special device name */
  tempSortType = sortType;
  sortType = DI_SORT_SPECIAL;
^^
it seems like the sorting is necessary here. I have however forwarded
your bugreport to upstream, lets see what he thinks.

bye,
- michael


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#425421: di: -t changes -sn to -ss

2007-05-29 Thread Michael Ablassmeier
hi again,

Bill: is this sorting really needed? it seems like di works just nicely
over here without the special sorting (Linux 2.6):

  [EMAIL PROTECTED]:~/qa/packages/di-4.10.dfsg.1$ ./di -sn -t
  Filesystem Mount   Megs UsedAvail %Used fs Type
  /dev/sda1  /  176.4174.5  0.0 100%  ext3   
  [..]
 Total   387308.4 262551.4 117024.0  70% 
  
  [EMAIL PROTECTED]:~/qa/packages/di-4.10.dfsg.1$ ./di -ss -t
  Filesystem Mount   Megs UsedAvail %Used fs Type
  /dev/mapper/data-m /data94867.7  49141.6  40907.1  57%  ext3 
  [..]
 Total   387308.4 262551.4 117024.0  70% 

patch is attached.

bye,
- michael
--- di.c.orig	2007-05-29 12:41:36.0 +0200
+++ di.c	2007-05-29 12:41:54.0 +0200
@@ -711,13 +711,6 @@
 if ((flags  DI_F_TOTAL) == DI_F_TOTAL 
 (flags  DI_F_NO_HEADER) != DI_F_NO_HEADER)
 {
-/* in order to find the main pool entry,*/
-/* we must have the array sorted by special device name */
-tempSortType = sortType;
-sortType = DI_SORT_SPECIAL;
-sortArray ((char *) diskInfo, sizeof (di_DiskInfo), diCount, diCompare);
-sortType = tempSortType;
-
 for (i = 0; i  diCount; ++i)
 {
 int ispooled = { 0 };


Bug#425421: di: -t changes -sn to -ss

2007-05-29 Thread Bill Brelsford
Michael,

On Tue May 29 2007 at 12:43 PM +0200, Michael Ablassmeier wrote:
 Bill: is this sorting really needed? it seems like di works just nicely
 over here without the special sorting (Linux 2.6):

 patch is attached.

I haven't looked at the source code, but I can see no reason that
sorting would be necessary in order to add column totals.  And that
(not sorting) was the behavior of previous versions.

Thanks..  Bill


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#425421: di: -t changes -sn to -ss

2007-05-21 Thread Bill Brelsford
Package: di
Version: 4.10.dfsg.1-1
Severity: normal


The command di -sn leaves the output unsorted (in mtab order).
But di -sn -t, while correctly adding a totals line, also sorts
the output by special device name (as if called with di -ss -t).

This problem does not occur in etch (4.9.dfsg.1-1).

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.20.wmb070219p3a (PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash

Versions of packages di depends on:
ii  libc6 2.5-7  GNU C Library: Shared libraries

di recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]