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/lib/sysfs.c
static int sysfs_blkdev_enoent_redirect(struct path_cxt* pc, const char* path,
                                        int* dirfd)
{
    struct sysfs_blkdev* blk = ul_path_get_dialect(pc);

    if (blk && blk->parent && strncmp(path, "queue/", 6) == 0)
    {
        *dirfd = ul_path_get_dirfd(blk->parent);
        if (*dirfd >= 0)
        {
            DBG(CXT, ul_debugobj(pc, "%s redirected to parent", path));
            return 0;
        }
    }
    return 1; /* no redirect */
}
/*
 * Redirects ENOENT errors to the parent, if the path is to the queue/
 * sysfs directory. For example
 *
 *	/sys/dev/block/8:1/queue/logical_block_size redirects to
 *	/sys/dev/block/8:0/queue/logical_block_size
 */
Redirects ENOENT errors to the parent, if the path is to the queue
sysfs directory. For example


Redirects ENOENT errors to the parent if the path is to the queue sysfs directory . For example
static int sysfs_blkdev_enoent_redirect(struct path_cxt* pc, const char* path,
                                        int* dirfd)
{
    struct sysfs_blkdev* blk = ul_path_get_dialect(pc);
    if (blk && blk->parent && strncmp(path, "queue/", 6) == 0)
    {
        *dirfd = ul_path_get_dirfd(blk->parent);
        if (*dirfd >= 0)
        {
            DBG(CXT, ul_debugobj(pc, "%s redirected to parent", path));
            return 0;
        }
    }
    return 1; 
}
static int sysfs_blkdev_enoent_redirect ( struct path_cxt * pc , const char * path , int * dirfd ) { struct sysfs_blkdev * blk = ul_path_get_dialect ( pc ) ; if ( blk && blk -> parent && strncmp ( path , " " , 6 ) == 0 ) { * dirfd = ul_path_get_dirfd ( blk -> parent ) ; if ( * dirfd >= 0 ) { DBG ( CXT , ul_debugobj ( pc , " " , path ) ) ; return 0 ; } } return 1 ; }
Redirects ENOENT errors to the parent, if the path is to the queue
 sysfs directory.
Redirects ENOENT errors to the parent if the path is to the queue sysfs directory .
/* no redirect */