From af72376773aa1434fe247ccb7c578abea9373fe7 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 18 Aug 2021 01:11:04 +0800 Subject: [PATCH] fs: Remove magic field from partition_info_s since it is wrong and impossible to return file system magic number from the block or mtd layer. Signed-off-by: Xiang Xiao --- arch/arm/src/cxd56xx/cxd56_sfc.c | 1 - arch/arm/src/lc823450/lc823450_mtd.c | 1 - arch/arm/src/lpc43xx/lpc43_spifi.c | 1 - arch/arm/src/rtl8720c/ameba_flash.c | 1 - arch/arm/src/tiva/common/tiva_flash.c | 1 - arch/risc-v/src/bl602/bl602_spiflash.c | 1 - arch/risc-v/src/esp32c3/esp32c3_spiflash.c | 1 - arch/xtensa/src/esp32/esp32_spiflash.c | 1 - boards/arm/imxrt/imxrt1064-evk/src/imxrt_flexspi_nor.c | 1 - drivers/mtd/at24xx.c | 1 - drivers/mtd/at25.c | 1 - drivers/mtd/at45db.c | 1 - drivers/mtd/filemtd.c | 1 - drivers/mtd/gd25.c | 1 - drivers/mtd/gd5f.c | 1 - drivers/mtd/is25xp.c | 1 - drivers/mtd/m25px.c | 1 - drivers/mtd/mtd_nand.c | 1 - drivers/mtd/mtd_partition.c | 1 - drivers/mtd/mtd_progmem.c | 1 - drivers/mtd/mtd_rwbuffer.c | 1 - drivers/mtd/mx25lx.c | 1 - drivers/mtd/mx25rxx.c | 1 - drivers/mtd/mx35.c | 1 - drivers/mtd/n25qxxx.c | 1 - drivers/mtd/rammtd.c | 1 - drivers/mtd/ramtron.c | 1 - drivers/mtd/s25fl1.c | 1 - drivers/mtd/sector512.c | 1 - drivers/mtd/skeleton.c | 1 - drivers/mtd/sst25.c | 1 - drivers/mtd/sst25xx.c | 1 - drivers/mtd/sst26.c | 1 - drivers/mtd/sst39vf.c | 1 - drivers/mtd/w25.c | 1 - drivers/mtd/w25qxxxjv.c | 1 - fs/driver/fs_blockpartition.c | 1 - include/nuttx/fs/fs.h | 2 -- 38 files changed, 39 deletions(-) diff --git a/arch/arm/src/cxd56xx/cxd56_sfc.c b/arch/arm/src/cxd56xx/cxd56_sfc.c index ec81dad34e..3ed01c8b77 100644 --- a/arch/arm/src/cxd56xx/cxd56_sfc.c +++ b/arch/arm/src/cxd56xx/cxd56_sfc.c @@ -218,7 +218,6 @@ static int cxd56_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->density / PAGE_SIZE; info->sectorsize = PAGE_SIZE; info->startsector = 0; diff --git a/arch/arm/src/lc823450/lc823450_mtd.c b/arch/arm/src/lc823450/lc823450_mtd.c index b56e2fd39a..b3195a7ea7 100644 --- a/arch/arm/src/lc823450/lc823450_mtd.c +++ b/arch/arm/src/lc823450/lc823450_mtd.c @@ -355,7 +355,6 @@ static int lc823450_ioctl(FAR struct mtd_dev_s *dev, int cmd, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nblocks; info->sectorsize = priv->blocksize; info->startsector = 0; diff --git a/arch/arm/src/lpc43xx/lpc43_spifi.c b/arch/arm/src/lpc43xx/lpc43_spifi.c index 2aa718ab2a..8d21b2a5a8 100644 --- a/arch/arm/src/lpc43xx/lpc43_spifi.c +++ b/arch/arm/src/lpc43xx/lpc43_spifi.c @@ -893,7 +893,6 @@ static int lpc43_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; #ifdef CONFIG_SPIFI_SECTOR512 info->numsectors = priv->nblocks << (SPIFI_BLKSHIFT - SPIFI_512SHIFT); diff --git a/arch/arm/src/rtl8720c/ameba_flash.c b/arch/arm/src/rtl8720c/ameba_flash.c index 86ad50c2f8..9d2a72e6ec 100644 --- a/arch/arm/src/rtl8720c/ameba_flash.c +++ b/arch/arm/src/rtl8720c/ameba_flash.c @@ -251,7 +251,6 @@ static int ameba_flash_ioctl(FAR struct mtd_dev_s *dev, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nsectors * AMEBA_SECTOR_SIZE / AMEBA_PAGE_SIZE; info->sectorsize = AMEBA_PAGE_SIZE; diff --git a/arch/arm/src/tiva/common/tiva_flash.c b/arch/arm/src/tiva/common/tiva_flash.c index 28747b8e76..e8087980ac 100644 --- a/arch/arm/src/tiva/common/tiva_flash.c +++ b/arch/arm/src/tiva/common/tiva_flash.c @@ -400,7 +400,6 @@ static int tiva_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = TIVA_VIRTUAL_NPAGES; info->sectorsize = TIVA_FLASH_PAGESIZE; info->startsector = 0; diff --git a/arch/risc-v/src/bl602/bl602_spiflash.c b/arch/risc-v/src/bl602/bl602_spiflash.c index 225f741275..0740c301d1 100644 --- a/arch/risc-v/src/bl602/bl602_spiflash.c +++ b/arch/risc-v/src/bl602/bl602_spiflash.c @@ -313,7 +313,6 @@ int bl602_ioctl(FAR struct mtd_dev_s *dev, int cmd, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->config->flash_size / SPIFLASH_BLOCKSIZE; info->sectorsize = SPIFLASH_BLOCKSIZE; diff --git a/arch/risc-v/src/esp32c3/esp32c3_spiflash.c b/arch/risc-v/src/esp32c3/esp32c3_spiflash.c index a9bfe59a80..059757a591 100644 --- a/arch/risc-v/src/esp32c3/esp32c3_spiflash.c +++ b/arch/risc-v/src/esp32c3/esp32c3_spiflash.c @@ -880,7 +880,6 @@ static int esp32c3_ioctl(struct mtd_dev_s *dev, int cmd, struct partition_info_s *info = (struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = SPI_FLASH_SIZE / SPI_FLASH_BLK_SIZE; info->sectorsize = SPI_FLASH_BLK_SIZE; info->startsector = 0; diff --git a/arch/xtensa/src/esp32/esp32_spiflash.c b/arch/xtensa/src/esp32/esp32_spiflash.c index b157e5ec25..c813afe6e4 100644 --- a/arch/xtensa/src/esp32/esp32_spiflash.c +++ b/arch/xtensa/src/esp32/esp32_spiflash.c @@ -1936,7 +1936,6 @@ static int esp32_ioctl(FAR struct mtd_dev_s *dev, int cmd, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = MTD_SIZE(priv) / MTD_BLKSIZE(priv); info->sectorsize = MTD_BLKSIZE(priv); info->startsector = 0; diff --git a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_flexspi_nor.c b/boards/arm/imxrt/imxrt1064-evk/src/imxrt_flexspi_nor.c index 51d5112433..0373bf21db 100644 --- a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_flexspi_nor.c +++ b/boards/arm/imxrt/imxrt1064-evk/src/imxrt_flexspi_nor.c @@ -584,7 +584,6 @@ static int imxrt_flexspi_nor_ioctl(FAR struct mtd_dev_s *dev, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = 32768; /* 8MB only */ info->sectorsize = NOR_PAGE_SIZE; info->startsector = 0; diff --git a/drivers/mtd/at24xx.c b/drivers/mtd/at24xx.c index b89d04b503..b59aa53445 100644 --- a/drivers/mtd/at24xx.c +++ b/drivers/mtd/at24xx.c @@ -638,7 +638,6 @@ static int at24c_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; #if CONFIG_AT24XX_MTD_BLOCKSIZE > AT24XX_PAGESIZE info->numsectors = (CONFIG_AT24XX_SIZE * 1024 / 8) / CONFIG_AT24XX_MTD_BLOCKSIZE; diff --git a/drivers/mtd/at25.c b/drivers/mtd/at25.c index 8594064ec7..95be2d7276 100644 --- a/drivers/mtd/at25.c +++ b/drivers/mtd/at25.c @@ -645,7 +645,6 @@ static int at25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nsectors << (priv->sectorshift - priv->pageshift); info->sectorsize = 1 << priv->pageshift; diff --git a/drivers/mtd/at45db.c b/drivers/mtd/at45db.c index 04bc4c94b2..b244aae633 100644 --- a/drivers/mtd/at45db.c +++ b/drivers/mtd/at45db.c @@ -811,7 +811,6 @@ static int at45db_ioctl(FAR struct mtd_dev_s *mtd, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->npages; info->sectorsize = 1 << priv->pageshift; info->startsector = 0; diff --git a/drivers/mtd/filemtd.c b/drivers/mtd/filemtd.c index ca800e8f89..0cccae06c0 100644 --- a/drivers/mtd/filemtd.c +++ b/drivers/mtd/filemtd.c @@ -442,7 +442,6 @@ static int filemtd_ioctl(FAR struct mtd_dev_s *dev, int cmd, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nblocks * priv->erasesize / priv->blocksize; info->sectorsize = priv->blocksize; diff --git a/drivers/mtd/gd25.c b/drivers/mtd/gd25.c index 55815beae7..69ad85b832 100644 --- a/drivers/mtd/gd25.c +++ b/drivers/mtd/gd25.c @@ -951,7 +951,6 @@ static int gd25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nsectors * GD25_SECTOR_SIZE / GD25_PAGE_SIZE; info->sectorsize = GD25_PAGE_SIZE; diff --git a/drivers/mtd/gd5f.c b/drivers/mtd/gd5f.c index fb3c4e0bb0..05a1007452 100644 --- a/drivers/mtd/gd5f.c +++ b/drivers/mtd/gd5f.c @@ -787,7 +787,6 @@ static int gd5f_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nsectors << (priv->sectorshift - priv->pageshift); info->sectorsize = 1 << priv->pageshift; diff --git a/drivers/mtd/is25xp.c b/drivers/mtd/is25xp.c index 087519f5c0..8f36fcc99c 100644 --- a/drivers/mtd/is25xp.c +++ b/drivers/mtd/is25xp.c @@ -960,7 +960,6 @@ static int is25xp_ioctl(FAR struct mtd_dev_s *dev, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nsectors << (priv->sectorshift - priv->pageshift); info->sectorsize = 1 << priv->pageshift; diff --git a/drivers/mtd/m25px.c b/drivers/mtd/m25px.c index 6e2b43d175..6b3e198978 100644 --- a/drivers/mtd/m25px.c +++ b/drivers/mtd/m25px.c @@ -1042,7 +1042,6 @@ static int m25p_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nsectors << (priv->sectorshift - priv->pageshift); info->sectorsize = 1 << priv->pageshift; diff --git a/drivers/mtd/mtd_nand.c b/drivers/mtd/mtd_nand.c index 614fd348b2..1a8fc9dd51 100644 --- a/drivers/mtd/mtd_nand.c +++ b/drivers/mtd/mtd_nand.c @@ -812,7 +812,6 @@ static int nand_ioctl(struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = nandmodel_getdevblocks(model) * nandmodel_getbyteblocksize(model) / model->pagesize; diff --git a/drivers/mtd/mtd_partition.c b/drivers/mtd/mtd_partition.c index bc5588af19..8321fc6a40 100644 --- a/drivers/mtd/mtd_partition.c +++ b/drivers/mtd/mtd_partition.c @@ -420,7 +420,6 @@ static int part_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->neraseblocks * priv->blkpererase; info->sectorsize = priv->blocksize; info->startsector = priv->firstblock; diff --git a/drivers/mtd/mtd_progmem.c b/drivers/mtd/mtd_progmem.c index 1d3c79916c..2b173014a4 100644 --- a/drivers/mtd/mtd_progmem.c +++ b/drivers/mtd/mtd_progmem.c @@ -333,7 +333,6 @@ static int progmem_ioctl(FAR struct mtd_dev_s *dev, int cmd, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = up_progmem_neraseblocks() << (priv->ersshift - priv->blkshift); info->sectorsize = 1 << priv->blkshift; diff --git a/drivers/mtd/mtd_rwbuffer.c b/drivers/mtd/mtd_rwbuffer.c index 1a4d3457a2..154c6fcbd0 100644 --- a/drivers/mtd/mtd_rwbuffer.c +++ b/drivers/mtd/mtd_rwbuffer.c @@ -302,7 +302,6 @@ static int mtd_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->rwb.nblocks; info->sectorsize = priv->rwb.blocksize; info->startsector = 0; diff --git a/drivers/mtd/mx25lx.c b/drivers/mtd/mx25lx.c index 72bf491e02..d23229d200 100644 --- a/drivers/mtd/mx25lx.c +++ b/drivers/mtd/mx25lx.c @@ -1089,7 +1089,6 @@ static int mx25l_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; #ifdef CONFIG_MX25L_SECTOR512 info->numsectors = priv->nsectors << (priv->sectorshift - MX25L_SECTOR512_SHIFT); diff --git a/drivers/mtd/mx25rxx.c b/drivers/mtd/mx25rxx.c index 19092610ec..bfb1da865c 100644 --- a/drivers/mtd/mx25rxx.c +++ b/drivers/mtd/mx25rxx.c @@ -759,7 +759,6 @@ int mx25rxx_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; #ifdef CONFIG_MX25RXX_SECTOR512 info->numsectors = priv->nsectors << (priv->sectorshift - MX25RXX_SECTOR512_SHIFT); diff --git a/drivers/mtd/mx35.c b/drivers/mtd/mx35.c index cdf59fd3ac..9df2fdecb3 100644 --- a/drivers/mtd/mx35.c +++ b/drivers/mtd/mx35.c @@ -817,7 +817,6 @@ static int mx35_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nsectors << (priv->sectorshift - priv->pageshift); info->sectorsize = 1 << priv->pageshift; diff --git a/drivers/mtd/n25qxxx.c b/drivers/mtd/n25qxxx.c index 3321832a9f..bf6c6bb3df 100644 --- a/drivers/mtd/n25qxxx.c +++ b/drivers/mtd/n25qxxx.c @@ -1407,7 +1407,6 @@ static int n25qxxx_ioctl(FAR struct mtd_dev_s *dev, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; #ifdef CONFIG_N25QXXX_SECTOR512 info->numsectors = priv->nsectors << (priv->sectorshift - N25QXXX_SECTOR512_SHIFT); diff --git a/drivers/mtd/rammtd.c b/drivers/mtd/rammtd.c index b1396bfe86..c3014900a8 100644 --- a/drivers/mtd/rammtd.c +++ b/drivers/mtd/rammtd.c @@ -405,7 +405,6 @@ static int ram_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nblocks * CONFIG_RAMMTD_ERASESIZE / CONFIG_RAMMTD_BLOCKSIZE; diff --git a/drivers/mtd/ramtron.c b/drivers/mtd/ramtron.c index 0495af0298..df282ab43d 100644 --- a/drivers/mtd/ramtron.c +++ b/drivers/mtd/ramtron.c @@ -960,7 +960,6 @@ static int ramtron_ioctl(FAR struct mtd_dev_s *dev, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nsectors * (priv->sectorshift - priv->pageshift); info->sectorsize = 1 << priv->pageshift; diff --git a/drivers/mtd/s25fl1.c b/drivers/mtd/s25fl1.c index 0688cdf701..9b336df596 100644 --- a/drivers/mtd/s25fl1.c +++ b/drivers/mtd/s25fl1.c @@ -1453,7 +1453,6 @@ static int s25fl1_ioctl(FAR struct mtd_dev_s *dev, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; #ifdef CONFIG_S25FL1_SECTOR512 info->numsectors = priv->nsectors << (priv->sectorshift - S25FL1_SECTOR512_SHIFT); diff --git a/drivers/mtd/sector512.c b/drivers/mtd/sector512.c index b0868c6683..b963079ffe 100644 --- a/drivers/mtd/sector512.c +++ b/drivers/mtd/sector512.c @@ -549,7 +549,6 @@ static int s512_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->neblocks * priv->stdperblock; info->sectorsize = SECTOR_512; info->startsector = 0; diff --git a/drivers/mtd/skeleton.c b/drivers/mtd/skeleton.c index 681bcb4aed..2597100319 100644 --- a/drivers/mtd/skeleton.c +++ b/drivers/mtd/skeleton.c @@ -265,7 +265,6 @@ static int skel_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = 8192; info->sectorsize = 512; info->startsector = 0; diff --git a/drivers/mtd/sst25.c b/drivers/mtd/sst25.c index f319f9d5cf..baf1805a85 100644 --- a/drivers/mtd/sst25.c +++ b/drivers/mtd/sst25.c @@ -1201,7 +1201,6 @@ static int sst25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; #ifdef CONFIG_SST25_SECTOR512 info->numsectors = priv->nsectors << (priv->sectorshift - SST25_SECTOR_SHIFT); diff --git a/drivers/mtd/sst25xx.c b/drivers/mtd/sst25xx.c index bfd2f6a94b..d36153cbed 100644 --- a/drivers/mtd/sst25xx.c +++ b/drivers/mtd/sst25xx.c @@ -899,7 +899,6 @@ static int sst25xx_ioctl(FAR struct mtd_dev_s *dev, int cmd, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nsectors * (priv->sectorshift - priv->pageshift); info->sectorsize = 1 << priv->pageshift; diff --git a/drivers/mtd/sst26.c b/drivers/mtd/sst26.c index 1226a3cfca..f90af047ff 100644 --- a/drivers/mtd/sst26.c +++ b/drivers/mtd/sst26.c @@ -904,7 +904,6 @@ static int sst26_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->nsectors * (priv->sectorshift - priv->pageshift); info->sectorsize = 1 << priv->pageshift; diff --git a/drivers/mtd/sst39vf.c b/drivers/mtd/sst39vf.c index f4205cf140..49f166c3d0 100644 --- a/drivers/mtd/sst39vf.c +++ b/drivers/mtd/sst39vf.c @@ -742,7 +742,6 @@ static int sst39vf_ioctl(FAR struct mtd_dev_s *dev, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; info->numsectors = priv->chip->nsectors; info->sectorsize = priv->chip->sectorsize; info->startsector = 0; diff --git a/drivers/mtd/w25.c b/drivers/mtd/w25.c index 5533483a9e..50e91bc74c 100644 --- a/drivers/mtd/w25.c +++ b/drivers/mtd/w25.c @@ -1329,7 +1329,6 @@ static int w25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; #ifdef CONFIG_W25_SECTOR512 info->numsectors = priv->nsectors << (W25_SECTOR_SHIFT - W25_SECTOR512_SHIFT); diff --git a/drivers/mtd/w25qxxxjv.c b/drivers/mtd/w25qxxxjv.c index 5c8560c4ec..7bb4e35252 100644 --- a/drivers/mtd/w25qxxxjv.c +++ b/drivers/mtd/w25qxxxjv.c @@ -1413,7 +1413,6 @@ static int w25qxxxjv_ioctl(FAR struct mtd_dev_s *dev, (FAR struct partition_info_s *)arg; if (info != NULL) { - info->magic = 0; #ifdef CONFIG_W25QXXXJV_SECTOR512 info->numsectors = priv->nsectors << (priv->sectorshift - W25QXXXJV_SECTOR512_SHIFT); diff --git a/fs/driver/fs_blockpartition.c b/fs/driver/fs_blockpartition.c index d4c195f5b3..f5b6b567a7 100644 --- a/fs/driver/fs_blockpartition.c +++ b/fs/driver/fs_blockpartition.c @@ -223,7 +223,6 @@ static int part_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) (FAR struct partition_info_s *)ptr_arg; if (info != NULL) { - info->magic = 0; info->numsectors = dev->nsectors; info->sectorsize = dev->sectorsize; info->startsector = dev->firstsector; diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h index 81b1229954..2408077641 100644 --- a/include/nuttx/fs/fs.h +++ b/include/nuttx/fs/fs.h @@ -226,8 +226,6 @@ struct geometry struct partition_info_s { - uint32_t magic; /* File system magic, 0 for RAW - * (see ) */ size_t numsectors; /* Number of sectors in the partition */ size_t sectorsize; /* Size in bytes of a single sector */ off_t startsector; /* Offset to the first section/block of the