nicolas / debian.moreutils (public) (License: GPL-2, GPL-2+, Expat, BSD-2-Clause, Public Domain) (since 2018-09-25) (hash sha1)
Debian packaging of joeyh's moreutils
List of commits:
Subject Hash Author Date (UTC)
* ifdata: robustness patch from Adam Lackorzynski, in particular deal with /proc not mounted. Closes: #358930 78133bda9c752e761ae00b6a43d2ddf5c67af53f joeyh 2006-03-25 17:52:25
releasing version 0.8 7e8e057cd10ca3d436f786003c0c34e5074074dd joeyh 2006-03-25 02:01:45
* ifdata: patch from its author to make it behave properly on big endian systems. Closes: #358860 eb2a08e762578bb86e0e6135c5808a0d82e91a8c joeyh 2006-03-25 01:51:39
* tss.1, ifdata.1: typo fix. Closes: #358557, #358556 77f42d643d76d6aa7d884fe9c6eadd7fcc57bc64 joeyh 2006-03-23 08:47:52
* Back to Mithandir's C sponge, now fixed. 5942eb1d3bd089b4f01daab04ca0ad8518e8b2ef joeyh 2006-03-23 07:18:36
* ifdata: Patch from KELEMEN Peter to add support for printing hardware interface. Closes: #357646 824b3e16d5f3962f7bdba0ff3159363afad3cc68 joeyh 2006-03-18 19:17:43
er yeah, let's check in the right stuff fa7787ccb87cc8c47f118c65d5bbada602323a68 joeyh 2006-03-16 17:08:29
* Add pee (pipe tee) contributed by Miek Gieben. 93b625d8288ff9ec522460dac489a170ef130d8c joeyh 2006-03-14 23:08:19
releasing version 0.6 84cc0252d7bf1cc8514ef347e150e9c8b930f0bd joeyh 2006-03-13 17:06:37
typo 7b031cc5149b6558cb5964b8db55538792de3ea6 joeyh 2006-03-10 20:26:29
releasing version 0.5 538cb394703d148130ec9a7f60da677996a4857a joeyh 2006-03-08 04:09:50
* Replaced and(1) and not(1) by combine, based on an idea by Matt Taggart. 4671f67156c1c59c2f9f7c3ead1a2e9141375d41 joeyh 2006-03-08 04:04:34
* README updates based on user feedback. 1530f8ec01fe7e688946203ec19624e1609c221c joeyh 2006-03-08 03:25:58
* Indentation improvements. d8c8aa26cb9f1f4bd411056ad3049ed0357ae3e4 joeyh 2006-03-08 03:19:40
rename c996e056d782796fba098b546f16d7ead1ea9d78 joeyh 2006-03-08 03:03:37
* Added ifinfo, by Benjamin BAYART (originally called ifcfg). * Made ifinfo -Wall clean. * Made ifinfo support -h and print usage on unknown options. * Cleaned up ifinfo's behavior when asked to print info for nonexistant devices. Still needs improvement. e50ccc1b36213de52ae78c2703d391ea8941a7b1 joeyh 2006-03-08 02:59:27
releasing version 0.4 6a7f34809e87a940cd30c7e9de160db4ee9e65ca joeyh 2006-03-06 03:33:23
releasing version 0.3 31bab120cc259d70b3706dbd7210159b4667171d joeyh 2006-03-03 23:20:51
better abde923d30e354d96cb6673597fa538cf80476dd joeyh 2006-03-03 22:38:51
* Switch sponge to a C implementation by mithandir. * Build dep on docbook-xml. d8e27a6d4d287995a554f27605e912be38d0a75b joeyh 2006-03-03 22:26:20
Commit 78133bda9c752e761ae00b6a43d2ddf5c67af53f - * ifdata: robustness patch from Adam Lackorzynski, in particular deal with /proc not mounted. Closes: #358930
Author: joeyh
Author date (UTC): 2006-03-25 17:52
Committer name: joeyh
Committer date (UTC): 2006-03-25 17:52
Parent(s): 7e8e057cd10ca3d436f786003c0c34e5074074dd
Signer:
Signing key:
Signing status: N
Tree: 1844c02d4d6edf651c02e0912829b88e75389a21
File Lines added Lines deleted
debian/changelog 7 0
ifdata.c 43 19
File debian/changelog changed (mode: 100644) (index 0fd520c..ad82f51)
1 moreutils (0.9) UNRELEASED; urgency=low
2
3 * ifdata: robustness patch from Adam Lackorzynski, in particular deal with
4 /proc not mounted. Closes: #358930
5
6 -- Joey Hess <joeyh@debian.org> Sat, 25 Mar 2006 12:51:26 -0500
7
1 8 moreutils (0.8) unstable; urgency=low moreutils (0.8) unstable; urgency=low
2 9
3 10 * Back to Mithandir's C sponge, now fixed. * Back to Mithandir's C sponge, now fixed.
File ifdata.c changed (mode: 100644) (index 92b68a6..c9a4622)
... ... struct if_stat *get_stats(char *iface) {
275 275 int state=START; int state=START;
276 276 int len; int len;
277 277 struct if_stat *res=malloc(sizeof(struct if_stat)); struct if_stat *res=malloc(sizeof(struct if_stat));
278
279 if (!res) {
280 perror("malloc");
281 return NULL;
282 }
283
278 284 fd=open("/proc/net/dev",O_RDONLY); fd=open("/proc/net/dev",O_RDONLY);
279 285 if (fd==-1) { if (fd==-1) {
280 perror("open");
286 perror("open(\"/proc/net/dev\")");
281 287 return NULL; return NULL;
282 288 } }
283 289 while ((len=read(fd,buffer,4096))) { while ((len=read(fd,buffer,4096))) {
 
... ... void please_do(int ndo, int *todo, char *ifname) {
442 448 break; break;
443 449 case DO_SINPACKETS: case DO_SINPACKETS:
444 450 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
445 printf("%llu",stats->in_packets);
451 if (stats)
452 printf("%llu",stats->in_packets);
446 453 break; break;
447 454 case DO_SINBYTES: case DO_SINBYTES:
448 455 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
449 printf("%llu",stats->in_bytes);
456 if (stats)
457 printf("%llu",stats->in_bytes);
450 458 break; break;
451 459 case DO_SINERRORS: case DO_SINERRORS:
452 460 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
453 printf("%llu",stats->in_errors);
461 if (stats)
462 printf("%llu",stats->in_errors);
454 463 break; break;
455 464 case DO_SINDROPS: case DO_SINDROPS:
456 465 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
457 printf("%llu",stats->in_drops);
466 if (stats)
467 printf("%llu",stats->in_drops);
458 468 break; break;
459 469 case DO_SINFIFO: case DO_SINFIFO:
460 470 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
461 printf("%llu",stats->in_fifo);
471 if (stats)
472 printf("%llu",stats->in_fifo);
462 473 break; break;
463 474 case DO_SINFRAME: case DO_SINFRAME:
464 475 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
465 printf("%llu",stats->in_frame);
476 if (stats)
477 printf("%llu",stats->in_frame);
466 478 break; break;
467 479 case DO_SINCOMPRESSES: case DO_SINCOMPRESSES:
468 480 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
469 printf("%llu",stats->in_compress);
481 if (stats)
482 printf("%llu",stats->in_compress);
470 483 break; break;
471 484 case DO_SINMULTICAST: case DO_SINMULTICAST:
472 485 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
473 printf("%llu",stats->in_multicast);
486 if (stats)
487 printf("%llu",stats->in_multicast);
474 488 break; break;
475 489 case DO_SINALL: case DO_SINALL:
476 490 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
477 printf("%llu %llu %llu %llu %llu %llu %llu %llu",
491 if (stats)
492 printf("%llu %llu %llu %llu %llu %llu %llu %llu",
478 493 stats->in_packets, stats->in_packets,
479 494 stats->in_bytes, stats->in_bytes,
480 495 stats->in_errors, stats->in_errors,
 
... ... void please_do(int ndo, int *todo, char *ifname) {
486 501 break; break;
487 502 case DO_SOUTBYTES: case DO_SOUTBYTES:
488 503 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
489 printf("%llu",stats->out_bytes);
504 if (stats)
505 printf("%llu",stats->out_bytes);
490 506 break; break;
491 507 case DO_SOUTPACKETS: case DO_SOUTPACKETS:
492 508 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
493 printf("%llu",stats->out_packets);
509 if (stats)
510 printf("%llu",stats->out_packets);
494 511 break; break;
495 512 case DO_SOUTERRORS: case DO_SOUTERRORS:
496 513 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
497 printf("%llu",stats->out_errors);
514 if (stats)
515 printf("%llu",stats->out_errors);
498 516 break; break;
499 517 case DO_SOUTDROPS: case DO_SOUTDROPS:
500 518 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
501 printf("%llu",stats->out_drops);
519 if (stats)
520 printf("%llu",stats->out_drops);
502 521 break; break;
503 522 case DO_SOUTFIFO: case DO_SOUTFIFO:
504 523 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
505 printf("%llu",stats->out_fifo);
524 if (stats)
525 printf("%llu",stats->out_fifo);
506 526 break; break;
507 527 case DO_SOUTCOLLS: case DO_SOUTCOLLS:
508 528 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
509 printf("%llu",stats->out_colls);
529 if (stats)
530 printf("%llu",stats->out_colls);
510 531 break; break;
511 532 case DO_SOUTCARRIER: case DO_SOUTCARRIER:
512 533 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
513 printf("%llu",stats->out_carrier);
534 if (stats)
535 printf("%llu",stats->out_carrier);
514 536 break; break;
515 537 case DO_SOUTMULTICAST: case DO_SOUTMULTICAST:
516 538 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
517 printf("%llu",stats->out_multicast);
539 if (stats)
540 printf("%llu",stats->out_multicast);
518 541 break; break;
519 542 case DO_SOUTALL: case DO_SOUTALL:
520 543 if (!stats) stats=get_stats(ifname); if (!stats) stats=get_stats(ifname);
521 printf("%llu %llu %llu %llu %llu %llu %llu %llu",
544 if (stats)
545 printf("%llu %llu %llu %llu %llu %llu %llu %llu",
522 546 stats->out_packets, stats->out_packets,
523 547 stats->out_bytes, stats->out_bytes,
524 548 stats->out_errors, stats->out_errors,
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/nicolas/debian.moreutils

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/nicolas/debian.moreutils

Clone this repository using git:
git clone git://git.rocketgit.com/user/nicolas/debian.moreutils

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main