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/libfdisk/src/context.c
fdisk_sector_t fdisk_set_last_lba(struct fdisk_context* cxt, fdisk_sector_t lba)
{
    assert(cxt);

    if (lba > cxt->total_sectors - 1 || lba < 1)
        return -ERANGE;
    cxt->last_lba = lba;
    return 0;
}
/**
 * fdisk_set_last_lba:
 * @cxt: fdisk context
 * @lba: last possible logical sector
 *
 * It's strongly recommended to use the default library setting. The last LBA
 * is always reset by fdisk_assign_device(), fdisk_override_geometry() and
 * fdisk_reset_alignment().
 *
 * The default is number of sectors on the device, but maybe modified by the
 * current disklabel driver (for example GPT uses the end of disk for backup
 * header, so last_lba is smaller than total number of sectors).
 *
 * Returns: 0 on success, <0 on error.
 */
@cxt: fdisk context
@lba: last possible logical sector

It's strongly recommended to use the default library setting. The last LBA
is always reset by fdisk_assign_device(), fdisk_override_geometry() and
fdisk_reset_alignment().

The default is number of sectors on the device, but maybe modified by the
current disklabel driver (for example GPT uses the end of disk for backup
header, so last_lba is smaller than total number of sectors).

0 on success, <0 on error.
@cxt : fdisk context @lba : last possible logical sector It ' s strongly recommended to use the default library setting . The last LBA is always reset by fdisk_assign_device () fdisk_override_geometry () and fdisk_reset_alignment () . The default is number of sectors on the device but maybe modified by the current disklabel driver ( for example GPT uses the end of disk for backup header so last_lba is smaller than total number of sectors ) . 0 on success <0 on error .
fdisk_sector_t fdisk_set_last_lba(struct fdisk_context* cxt, fdisk_sector_t lba)
{
    assert(cxt);
    if (lba > cxt->total_sectors - 1 || lba < 1)
        return -ERANGE;
    cxt->last_lba = lba;
    return 0;
}
fdisk_sector_t fdisk_set_last_lba ( struct fdisk_context * cxt , fdisk_sector_t lba ) { assert ( cxt ) ; if ( lba > cxt -> total_sectors - 1 || lba < 1 ) return - ERANGE ; cxt -> last_lba = lba ; return 0 ; }
fdisk_set_last_lba:
 @cxt: fdisk context
 @lba: last possible logical sector
fdisk_set_last_lba : @cxt : fdisk context @lba : last possible logical sector