openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/mtd-utils/2.1.0+AUTOINC+b5027be5f4-r0/git/tests/checkfs/comm.c
int do_pwr_dn(int fd, int cycleCnt)
{

    char buf[200];

    sprintf(buf, "ok to power me down!\nCount = %i\n", cycleCnt);

    if (write(fd, buf, strlen(buf)) < strlen(buf))
    {
        perror("write error");
        return -1;
    }

    return 0;
}
/*
  This is the routine that forms and
  sends the "ok to pwr me down" message
  to the remote power cycling "black box".

 */
This is the routine that forms and
sends the "ok to pwr me down" message
to the remote power cycling "black box".
This is the routine that forms and sends the " ok to pwr me down " message to the remote power cycling " black box " .
int do_pwr_dn(int fd, int cycleCnt)
{
    char buf[200];
    sprintf(buf, "ok to power me down!\nCount = %i\n", cycleCnt);
    if (write(fd, buf, strlen(buf)) < strlen(buf))
    {
        perror("write error");
        return -1;
    }
    return 0;
}
int do_pwr_dn ( int fd , int cycleCnt ) { char buf [ 200 ] ; sprintf ( buf , " \n \n " , cycleCnt ) ; if ( write ( fd , buf , strlen ( buf ) ) < strlen ( buf ) ) { perror ( " " ) ; return -1 ; } return 0 ; }
This is the routine that forms and
sends the "ok to pwr me down" message
to the remote power cycling "black box".
This is the routine that forms and sends the " ok to pwr me down " message to the remote power cycling " black box " .