Revisão | f6325128b1d7d4d60083e06e83a65ded43aa9d7f (tree) |
---|---|
Hora | 2014-02-15 19:31:55 |
Autor | Yoshinori Sato <ysato@sa76...> |
Commiter | Yoshinori Sato |
more chatter
@@ -347,12 +347,12 @@ int main(int argc, char *argv[]) | ||
347 | 347 | |
348 | 348 | if (setup_connection(p, input_freq) < 0) |
349 | 349 | goto error; |
350 | - puts("connect target"); | |
350 | + puts("Connect target"); | |
351 | 351 | |
352 | - if(!get_rominfo(p, &writeinfo)) | |
352 | + if (!get_rominfo(p, &writeinfo)) | |
353 | 353 | goto error; |
354 | 354 | |
355 | - if(writefile_to_rom(argv[optind], force_binary, | |
355 | + if (writefile_to_rom(argv[optind], force_binary, | |
356 | 356 | &writeinfo, p)) { |
357 | 357 | VERBOSE_PRINT("write %08x - %08x ", writeinfo.area.start, |
358 | 358 | writeinfo.area.end); |
@@ -88,6 +88,8 @@ static int connect_target(char *port) | ||
88 | 88 | unsigned char buf[BAUD_ADJUST_LEN]; |
89 | 89 | |
90 | 90 | /* wait connection establish */ |
91 | + printf("Connecting via %s", port); | |
92 | + fflush(stdout); | |
91 | 93 | for(try1 = 0; try1 < TRY1COUNT; try1++) { |
92 | 94 | memset(buf, 0x00, BAUD_ADJUST_LEN); |
93 | 95 | /* send dummy data */ |
@@ -102,10 +104,7 @@ static int connect_target(char *port) | ||
102 | 104 | return 0; |
103 | 105 | if ((r > 0) && (read(ser_fd, buf, 1) == 1) && buf[0] == 0) |
104 | 106 | goto connect; |
105 | - if (try1 == 0) { | |
106 | - printf("now connecting via %s", port); | |
107 | - fflush(stdout); | |
108 | - } else { | |
107 | + if (try1 > 0) { | |
109 | 108 | putchar('.'); |
110 | 109 | fflush(stdout); |
111 | 110 | } |
@@ -180,7 +179,7 @@ struct port_t *open_serial(char *ser_port) | ||
180 | 179 | snprintf(lockname, sizeof(lockname), LOCKDIR "/LCK..%s", basename(ser_port)); |
181 | 180 | lock_fd = serial_lock(lockname); |
182 | 181 | if (lock_fd == -1) { |
183 | - fputs(PROGNAME ": Serial port lock failed.\n",stderr); | |
182 | + fprintf(stderr, PROGNAME ": Serial port %s lock failed.\n", ser_port); | |
184 | 183 | return NULL; |
185 | 184 | } |
186 | 185 |