~ubuntu-branches/ubuntu/precise/iproute/precise

« back to all changes in this revision

Viewing changes to misc/lnstat.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabio M. Di Nitto
  • Date: 2007-06-11 13:31:12 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070611133112-0rtfv32yfs8loo0r
Tags: 20070313-1ubuntu1
* Merge from debian unstable, remaining changes:
  - linux-kernel-headers -> linux-libc-dev B-D rename.
  - MAX_ROUNDS patch to ip/ipaddress.c
  - Ubuntu maintainer foobar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
                                fps->params[j].lf->file->interval.tv_sec =
120
120
                                                                interval;
121
121
                                if (!fps->params[j].print.width)
122
 
                                        fps->params[j].print.width = 
 
122
                                        fps->params[j].print.width =
123
123
                                                        FIELD_WIDTH_DEFAULT;
124
124
                                j++;
125
125
                        }
204
204
        }
205
205
        return 0;
206
206
}
207
 
                
 
207
 
208
208
 
209
209
int main(int argc, char **argv)
210
210
{
222
222
        static struct field_params fp;
223
223
        int num_req_files = 0;
224
224
        char *req_files[LNSTAT_MAX_FILES];
225
 
        
 
225
 
226
226
        /* backwards compatibility mode for old tools */
227
227
        basename = strrchr(argv[0], '/');
228
 
        if (basename) 
 
228
        if (basename)
229
229
                basename += 1;    /* name after slash */
230
230
        else
231
231
                basename = argv[0]; /* no slash */
240
240
                num_req_files = 1;
241
241
        }
242
242
 
243
 
        while ((c = getopt_long(argc, argv,"Vc:df:h?i:k:s:w:", 
 
243
        while ((c = getopt_long(argc, argv,"Vc:df:h?i:k:s:w:",
244
244
                                opts, NULL)) != -1) {
245
245
                int i, len = 0;
246
246
                char *tmp, *tok;
256
256
                                req_files[num_req_files++] = strdup(optarg);
257
257
                                break;
258
258
                        case '?':
259
 
                        case 'h':       
 
259
                        case 'h':
260
260
                                usage(argv[0], 0);
261
261
                                break;
262
262
                        case 'i':
315
315
 
316
316
                if (!map_field_params(lnstat_files, &fp, interval))
317
317
                        exit(1);
318
 
        
 
318
 
319
319
                header = build_hdr_string(lnstat_files, &fp, 80);
320
320
                if (!header)
321
321
                        exit(1);
322
322
 
323
 
                if (interval < 1 ) 
 
323
                if (interval < 1 )
324
324
                        interval=1;
325
325
 
326
326
                for (i = 0; i < count; i++) {