From 76904371a18e4e9fddd290aea16f92af913879be Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 11 Aug 2021 11:07:21 +0800 Subject: [PATCH] fs: Remove endsector from partition_info_s since it can be computed from startsector and numsectors simply Signed-off-by: Xiang Xiao --- drivers/mtd/mtd_partition.c | 1 - include/nuttx/fs/fs.h | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/mtd/mtd_partition.c b/drivers/mtd/mtd_partition.c index a771604001..d0d5994aef 100644 --- a/drivers/mtd/mtd_partition.c +++ b/drivers/mtd/mtd_partition.c @@ -424,7 +424,6 @@ static int part_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) info->numsectors = priv->neraseblocks * priv->blkpererase; info->sectorsize = priv->blocksize; info->startsector = priv->firstblock; - info->endsector = priv->firstblock + info->numsectors; strncpy(info->parent, priv->parent->name, NAME_MAX); diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h index 9d80d566e2..45b670d45c 100644 --- a/include/nuttx/fs/fs.h +++ b/include/nuttx/fs/fs.h @@ -232,8 +232,6 @@ struct partition_info_s size_t sectorsize; /* Size in bytes of a single sector */ off_t startsector; /* Offset to the first section/block of the * managed sub-region */ - off_t endsector; /* Offset to the last section/block of the - * managed sub-region */ /* NULL-terminated string representing the name of the parent node of the * partition.