]> rtime.felk.cvut.cz Git - sojka/can-utils.git/blobdiff - candump.c
adapt column width format for high busload values
[sojka/can-utils.git] / candump.c
index 888c0fb4b731aab962dc82659a00a765d3c86bb6..5ba9431393fc8ef991963dd1a96e85d601c3c078 100644 (file)
--- a/candump.c
+++ b/candump.c
@@ -41,7 +41,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  * DAMAGE.
  *
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
  *
  */
 
@@ -121,6 +121,7 @@ void print_usage(char *prg)
        fprintf(stderr, "         -n <count>  (terminate after receiption of <count> CAN frames)\n");
        fprintf(stderr, "         -r <size>   (set socket receive buffer to <size>)\n");
        fprintf(stderr, "         -d          (monitor dropped CAN frames)\n");
+       fprintf(stderr, "         -e          (dump CAN error frames in human-readable format)\n");
        fprintf(stderr, "\n");
        fprintf(stderr, "Up to %d CAN interfaces with optional filter sets can be specified\n", MAXSOCK);
        fprintf(stderr, "on the commandline in the form: <ifname>[,filter]*\n");
@@ -235,7 +236,7 @@ int main(int argc, char **argv)
        last_tv.tv_sec  = 0;
        last_tv.tv_usec = 0;
 
-       while ((opt = getopt(argc, argv, "t:ciaSs:b:B:u:ldLn:r:h?")) != -1) {
+       while ((opt = getopt(argc, argv, "t:ciaSs:b:B:u:ldLn:r:he?")) != -1) {
                switch (opt) {
                case 't':
                        timestamp = optarg[0];
@@ -263,6 +264,10 @@ int main(int argc, char **argv)
                        view |= CANLIB_VIEW_SWAP;
                        break;
 
+               case 'e':
+                       view |= CANLIB_VIEW_ERROR;
+                       break;
+
                case 's':
                        silent = atoi(optarg);
                        if (silent > SILENT_ON) {