ほぼ雑記的メモ
--- fwcontrol.c- Wed Jul 13 16:17:18 2005 +++ fwcontrol.c Wed Jul 13 16:19:02 2005 @@ -61,7 +61,7 @@ fprintf(stderr, "fwcontrol [-u bus_num] [-rt] [-g gap_count] [-o node] " "[-b pri_req] [-c node] [-d node] [-l file] " - "[-R file] [-S file]\n" + "[-R file] [-S file] [-n count]\n" "\t-u: specify bus number\n" "\t-g: broadcast gap_count by phy_config packet\n" "\t-o: send link-on packet to the node\n" @@ -73,7 +73,8 @@ "\t-d: hex dump of configuration ROM\n" "\t-l: load and parse hex dump file of configuration ROM\n" "\t-R: Receive DV stream\n" - "\t-S: Send DV stream\n"); + "\t-S: Send DV stream\n" + "\t-n: Recevie DV stream count\n"); exit(0); } @@ -601,6 +602,7 @@ u_int32_t crom_buf[1024/4]; char devbase[1024] = "/dev/fw0"; int fd, i, tmp, ch, len=1024; + int count = -1; fd = -1; @@ -609,7 +611,7 @@ list_dev(fd); } - while ((ch = getopt(argc, argv, "g:o:s:b:prtc:d:l:u:R:S:")) != -1) + while ((ch = getopt(argc, argv, "g:o:s:b:prtc:d:l:u:R:S:n:")) != -1) switch(ch) { case 'b': tmp = strtol(optarg, NULL, 0); @@ -676,11 +678,14 @@ #define CHANNEL 63 case 'R': open_dev(&fd, devbase); - dvrecv(fd, optarg, TAG | CHANNEL, -1); + dvrecv(fd, optarg, TAG | CHANNEL, count); break; case 'S': open_dev(&fd, devbase); dvsend(fd, optarg, TAG | CHANNEL, -1); + break; + case 'n': + count = strtol(optarg, NULL, 0); break; default: usage();
Powered by Red Leaf ( Rev. c78c769f2 ), © Issei Numata, 2007-2021