openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/util-linux/2.33.2-r0/util-linux-2.33.2/libmount/src/context_loopdev.c
int mnt_context_clear_loopdev(struct libmnt_context* cxt)
{
    assert(cxt);

    if (mnt_context_get_status(cxt) == 0 && (cxt->flags & MNT_FL_LOOPDEV_READY))
    {
        /*
         * mount(2) failed, delete loopdev
         */
        mnt_context_delete_loopdev(cxt);
    }
    else if (cxt->loopdev_fd > -1)
    {
        /*
         * mount(2) success, close the device
         */
        DBG(LOOP, ul_debugobj(cxt, "closing FD"));
        close(cxt->loopdev_fd);
    }
    cxt->loopdev_fd = -1;
    return 0;
}
/*
 * Clears loopdev stuff in context, should be called after
 * failed or successful mount(2).
 */
Clears loopdev stuff in context, should be called after
failed or successful mount(2).
Clears loopdev stuff in context should be called after failed or successful mount ( 2 ) .
int mnt_context_clear_loopdev(struct libmnt_context* cxt)
{
    assert(cxt);
    if (mnt_context_get_status(cxt) == 0 && (cxt->flags & MNT_FL_LOOPDEV_READY))
    {
        mnt_context_delete_loopdev(cxt);
    }
    else if (cxt->loopdev_fd > -1)
    {
        DBG(LOOP, ul_debugobj(cxt, "closing FD"));
        close(cxt->loopdev_fd);
    }
    cxt->loopdev_fd = -1;
    return 0;
}
int mnt_context_clear_loopdev ( struct libmnt_context * cxt ) { assert ( cxt ) ; if ( mnt_context_get_status ( cxt ) == 0 && ( cxt -> flags & MNT_FL_LOOPDEV_READY ) ) { mnt_context_delete_loopdev ( cxt ) ; } else if ( cxt -> loopdev_fd > -1 ) { DBG ( LOOP , ul_debugobj ( cxt , " " ) ) ; close ( cxt -> loopdev_fd ) ; } cxt -> loopdev_fd = -1 ; return 0 ; }
Clears loopdev stuff in context, should be called after
 failed or successful mount(2).
Clears loopdev stuff in context should be called after failed or successful mount ( 2 ) .
/*
         * mount(2) failed, delete loopdev
         */ /*
         * mount(2) success, close the device
         */