Ignore:
Timestamp:
Jun 20, 2018, 7:59:22 PM (6 years ago)
Author:
coas-nagasima
Message:

SDカードの挿抜を検知するよう更新

Location:
asp3_tinet_ecnl_rx/trunk/ntshell/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/fdtable.c

    r337 r359  
    400400                FD_SET(fd, (fd_set *)&flgptn);
    401401        }
    402         if (rpor.wricnt < rpor.wbufsz) {
     402        if (rpor.wricnt != 0) {
    403403                if (fp->writeevt_w == fp->writeevt_r) fp->writeevt_w++;
    404404
     
    428428                FD_SET(fd, (fd_set *)flgptn);
    429429        }
    430         if (rpor.wricnt < rpor.wbufsz) {
     430        if (rpor.wricnt != 0) {
    431431                if (fp->writeevt_w == fp->writeevt_r) fp->writeevt_w++;
    432432
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/net_misc.c

    r340 r359  
    3333 *  の責任を負わない.
    3434 *
    35  *  @(#) $Id: net_misc.c 1497 2018-04-13 00:04:30Z coas-nagasima $
     35 *  @(#) $Id$
    3636 */
    3737
     
    6060#include "kernel_cfg.h"
    6161#include "tinet_cfg.h"
     62#include "util/ntstdio.h"
     63
     64extern ntstdio_t ntstdio;
    6265
    6366T_DHCP4_CLI_CONTEXT *dhcp4_cli_initialize(ID tskid, ID cepid);
     
    9497
    9598        get_tid(&nc->tskid);
    96         syslog(LOG_NOTICE, "[NET MISC:%d,%d] started.", nc->tskid, (ID)exinf);
     99        ntstdio_printf(&ntstdio, "[NET MISC:%d,%d] started.", nc->tskid, (ID)exinf);
    97100
    98101        /* 初期化 */
     
    102105        ret = get_tim(&time);
    103106        if (ret != E_OK) {
    104                 syslog(LOG_NOTICE, "[NET MISC,%d] get_tim error: %7lu,%s",
     107                ntstdio_printf(&ntstdio, "[NET MISC,%d] get_tim error: %7lu,%s",
    105108                        nc->cepid, time / SYSTIM_HZ, itron_strerror(ret));
    106109                return;
     
    116119                error = tslp_tsk(timer);
    117120                if ((error != E_OK) && (error != E_TMOUT)) {
    118                         syslog(LOG_NOTICE, "[NET MISC,%d] tslp_tsk error: %s %d",
     121                        ntstdio_printf(&ntstdio, "[NET MISC,%d] tslp_tsk error: %s %d",
    119122                                nc->cepid, itron_strerror(error), timer);
    120123                        break;
     
    123126                ret = get_tim(&time);
    124127                if (ret != E_OK) {
    125                         syslog(LOG_NOTICE, "[NET MISC,%d] get_tim error: %s",
     128                        ntstdio_printf(&ntstdio, "[NET MISC,%d] get_tim error: %s",
    126129                                nc->cepid, itron_strerror(ret));
    127130                        break;
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/net_misc.cfg

    r340 r359  
    3333 *  の責任を負わない.
    3434 *
    35  *  @(#) $Id: net_misc.cfg 1497 2018-04-13 00:04:30Z coas-nagasima $
     35 *  @(#) $Id$
    3636 */
    3737
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/net_misc.h

    r340 r359  
    3333 *  の責任を負わない.
    3434 *
    35  *  @(#) $Id: net_misc.h 1497 2018-04-13 00:04:30Z coas-nagasima $
     35 *  @(#) $Id$
    3636 */
    3737
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/ntp_cli.c

    r340 r359  
    3333 *  の責任を負わない.
    3434 *
    35  *  @(#) $Id: ntp_cli.c 1496 2018-04-12 11:59:40Z coas-nagasima $
     35 *  @(#) $Id$
    3636 */
    3737
     
    5050#include <t_syslog.h>
    5151#include "kernel_cfg.h"
     52#include "util/ntstdio.h"
     53
     54extern ntstdio_t ntstdio;
    5255
    5356#endif  /* of #if defined(TARGET_KERNEL_ASP) */
     
    276279        }
    277280
    278         syslog(LOG_NOTICE, "[NTP CLI,%d] recv time: %s .%09u",
     281        ntstdio_printf(&ntstdio, "[NTP CLI,%d] recv time: %s .%09u\n",
    279282                nc->cepid, nc->buf, tp.tv_nsec);
    280283}
     
    308311                line = lookup_ipaddr(&nc->ipaddr6, NTP_SRV_URL, API_PROTO_IPV4);
    309312                if (line == NULL || !in6_is_addr_ipv4mapped(&nc->ipaddr6)) {
    310                         syslog(LOG_NOTICE, "[NTP CLI,%d] sleep %d.%03u[s], unknown host.",
     313                        ntstdio_printf(&ntstdio, "[NTP CLI,%d] sleep %d.%03u[s], unknown host.",
    311314                                nc->cepid, SLP_ITV / SYSTIM_HZ, SLP_ITV % SYSTIM_HZ);
    312315                        nc->timer = SLP_ITV;
     
    316319#else   /* of #if defined(SUPPORT_INET6) && defined(SUPPORT_INET4) */
    317320                if ((line = lookup_ipaddr(&nc->snd_rmt.ipaddr, NTP_SRV_URL, DEFAULT_API_PROTO)) == NULL) {
    318                         syslog(LOG_NOTICE, "[NTP CLI,%d] sleep %d.%03u[s], unknown host.",
     321                        ntstdio_printf(&ntstdio, "[NTP CLI,%d] sleep %d.%03u[s], unknown host.",
    319322                                nc->cepid, SLP_ITV / SYSTIM_HZ, SLP_ITV % SYSTIM_HZ);
    320323                        nc->timer = SLP_ITV;
     
    420423
    421424        if ((error = udp_snd_dat(nc->cepid, &nc->snd_rmt, ntp, len, TMO_NBLK)) != E_WBLK) {
    422                 syslog(LOG_NOTICE, "[NTP CLI,%d] udp_snd_dat error: %s",
     425                ntstdio_printf(&ntstdio, "[NTP CLI,%d] udp_snd_dat error: %s",
    423426                        nc->cepid, itron_strerror(error));
    424427                return error;
     
    438441        ret = get_tim(&time);
    439442        if (ret != E_OK) {
    440                 syslog(LOG_NOTICE, "[NTP CLI,%d] get_tim error: %s",
     443                ntstdio_printf(&ntstdio, "[NTP CLI,%d] get_tim error: %s",
    441444                        nc->cepid, itron_strerror(ret));
    442445                tp->tv_sec = 0;
     
    458461        ret = set_tim(time);
    459462        if (ret != E_OK) {
    460                 syslog(LOG_NOTICE, "[NTP CLI,%d] set_tim error: %s",
     463                ntstdio_printf(&ntstdio, "[NTP CLI,%d] set_tim error: %s",
    461464                        nc->cepid, itron_strerror(ret));
    462465        }
     
    476479        if (len < 0 && len != E_RLWAI) {
    477480                /* E_RLWAI 以外で、0 以下の場合は、エラーを意味している。*/
    478                 syslog(LOG_NOTICE, "[NTP CLI,%d] callback error: %s, fncd: %s", nc->cepid,
     481                ntstdio_printf(&ntstdio, "[NTP CLI,%d] callback error: %s, fncd: %s", nc->cepid,
    479482                        itron_strerror(len), in_strtfn(fncd));
    480483        }
     
    483486                        if ((len = udp_rcv_dat(nc->cepid, &nc->rcv_rmt, &nc->ntp_msg, len, TMO_POL)) < 0)
    484487                        {
    485                                 syslog(LOG_NOTICE, "[NTP CLI,%d] udp_rcv_dat error: %s", nc->cepid,
     488                                ntstdio_printf(&ntstdio, "[NTP CLI,%d] udp_rcv_dat error: %s", nc->cepid,
    486489                                        itron_strerror(len));
    487490                        }
     
    515518
    516519        get_tid(&nc->tskid);
    517         syslog(LOG_NOTICE, "[NTP CLI:%d,%d] started.", nc->tskid, (ID)exinf);
     520        ntstdio_printf(&ntstdio, "[NTP CLI:%d,%d] started.", nc->tskid, (ID)exinf);
    518521
    519522        /* 初期化 */
     
    522525        ret = get_tim(&time);
    523526        if (ret != E_OK) {
    524                 syslog(LOG_NOTICE, "[NTP CLI,%d] get_tim error: %7lu,%s",
     527                ntstdio_printf(&ntstdio, "[NTP CLI,%d] get_tim error: %7lu,%s",
    525528                        nc->cepid, time / SYSTIM_HZ, itron_strerror(ret));
    526529                return;
     
    536539                error = tslp_tsk(timer);
    537540                if ((error != E_OK) && (error != E_TMOUT)) {
    538                         syslog(LOG_NOTICE, "[NTP CLI,%d] tslp_tsk error: %s %d",
     541                        ntstdio_printf(&ntstdio, "[NTP CLI,%d] tslp_tsk error: %s %d",
    539542                                nc->cepid, itron_strerror(error), timer);
    540543                        break;
     
    543546                ret = get_tim(&time);
    544547                if (ret != E_OK) {
    545                         syslog(LOG_NOTICE, "[NTP CLI,%d] get_tim error: %s",
     548                        ntstdio_printf(&ntstdio, "[NTP CLI,%d] get_tim error: %s",
    546549                                nc->cepid, itron_strerror(ret));
    547550                        break;
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/ntp_cli.cfg

    r340 r359  
    3333 *  の責任を負わない.
    3434 *
    35  *  @(#) $Id: ntp_cli.cfg 1496 2018-04-12 11:59:40Z coas-nagasima $
     35 *  @(#) $Id$
    3636 */
    3737
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/ntp_cli.h

    r340 r359  
    3333 *  の責任を負わない.
    3434 *
    35  *  @(#) $Id: ntp_cli.h 1496 2018-04-12 11:59:40Z coas-nagasima $
     35 *  @(#) $Id$
    3636 */
    3737
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/syscall.c

    r349 r359  
    3333 *  の責任を負わない.
    3434 *
    35  *  @(#) $Id: syscall.c 1530 2018-04-27 04:00:17Z coas-nagasima $
     35 *  @(#) $Id$
    3636 */
    3737#include "bits/syscall.h"
  • asp3_tinet_ecnl_rx/trunk/ntshell/src/tinet_ntp_cli.cfg

    r340 r359  
    2929 *  接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
    3030 *
    31  *  @(#) $Id: tinet_ntp_cli.cfg 1291 2017-07-20 02:51:05Z coas-nagasima $
     31 *  @(#) $Id$
    3232 */
    3333
Note: See TracChangeset for help on using the changeset viewer.