p-zhangliming1
4b2ae15069
nuttx/mtd: Add new functions part_isbad and part_markbad in mtd partition.
...
Signed-off-by: p-zhangliming1 <p-zhangliming1@xiaomi.com>
2023-08-16 23:56:18 +03:00
Michal Lenc
02aa7bcefe
mtd: add support for MTDIOC_ERASESECTORS ioctl
...
Current driver supports MTDIOC_BULKERASE ioctl that erases the entire
device. The added ioctl MTDIOC_ERASESECTORS adds possibility to erase
just sectors defined by the user.
This is similar to MEMERASE call in Linux kernel.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-04-29 21:23:08 +08:00
Xiang Xiao
c6d210289f
procfs: remove procfs_ from procfs_operations variables
...
to aglin the naming style with other implementation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
Xiang Xiao
149cafe450
procfs: Add g_ prefix to all procfs_operations
...
to conform the coding style
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
lilei19
38f64f559d
change strcpy to strlcpy
...
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-24 12:15:40 +08:00
Xiang Xiao
9f027208d4
fs: Add model field to geometry and mtd_geometry_s
...
the model is very useful to track the device info
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 11:50:28 -03:00
Huang Qi
e4e3208180
Replace all strncpy with strlcpy for safety
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-08-25 13:38:36 +08:00
Jiuzhu Dong
90db4daca9
fs/directory: update readdir interface for all filesystem
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
chao.an
6a212b1a2c
mtd/partition: fix compile warning
...
include/nuttx/mtd/mtd.h: In function ‘mtd_setpartitionname’:
mtd/mtd_partition.c:909:3: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
909 | strncpy(priv->name, name, sizeof(priv->name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-03-19 00:34:26 +08:00
Sebastien Lorquet
7f11255662
fix overflow checks in mtdpart
2021-11-30 10:43:27 -06:00
Gustavo Henrique Nihei
84e9ff085f
drivers/mtd: Fix code alignment for compliance to coding standard
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-28 02:28:03 +08:00
Gustavo Henrique Nihei
f153e42fcb
drivers/mtd: Fix /proc/partitions column alignment on NSH
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-28 02:28:03 +08:00
Xiang Xiao
af72376773
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 <xiaoxiang@xiaomi.com>
2021-08-20 09:19:52 -03:00
Xiang Xiao
6b6c11f0ad
mtd: Replace MTDIOC_XIPBASE with BIOC_XIPBASE
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-12 08:01:29 -03:00
Xiang Xiao
f4addbd640
mtd: Replace MTDIOC_PARTINFO with BIOC_PARTINFO
...
to simplify flt and partion layer implementation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-12 08:01:29 -03:00
Xiang Xiao
76904371a1
fs: Remove endsector from partition_info_s
...
since it can be computed from startsector and numsectors simply
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-11 09:26:43 -03:00
Gustavo Henrique Nihei
cddd9c9c38
mtd: Enable retrieval of MTD partition information
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-10 19:45:14 -07:00
Alan C. Assis
c4742c2197
mtd/smartfs: Fix compilation warning
2021-08-09 20:33:05 -03:00
Xiang Xiao
6a396eb224
Fix the printf warning after off_t change
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id46daa2ee690a73d3187b479f0e7ab0e2e361764
2021-08-04 06:48:30 -07:00
Alin Jerpelea
e5b6305f4a
drivers: Author Gregory Nutt: update licenses to Apache
...
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-04 18:32:27 -08:00
YAMAMOTO Takashi
565a67262b
drivers/mtd/mtd_partition.c: Fix printf format warnings
2020-11-16 08:29:00 -08:00
YAMAMOTO Takashi
4c663c9713
drivers/mtd/mtd_partition.c: Appease nxstyle
2020-11-16 05:46:53 -08:00
Xiang Xiao
cde88cabcc
Run codespell -w with the latest dictonary again
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao
68951e8d72
Remove exra whitespace from files ( #189 )
...
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Xiang Xiao
2e18b603ad
drivers/mtd/mtd_partition.c: Remove the hard code partition name length
2018-11-09 08:24:17 -06:00
Xiang Xiao
247414c6ad
drivers/mtd and other MTD drivers: Remove mtd_procfsoperations since we can now get the same information from inode
2018-11-08 09:46:11 -06:00
Xiang Xiao
41a1e76735
drivers/mtd/mtd_partition.c: Copy the partition name to internal buffer so that the caller can free the name argument
2018-08-28 07:09:59 -06:00
Gregory Nutt
7cf88d7dbd
Make sure that labeling is used consistently in all function headers.
2018-02-01 10:00:02 -06:00
Juha Niskanen
06edfae133
mtd/config: Add some error checks for I/O errors
2017-06-01 06:22:27 -06:00
Gregory Nutt
1793c1f8e1
Trivial, cosmetic change
2016-11-29 15:03:51 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00
Gregory Nutt
fc3540cffe
Replace all occurrences of vdbg with vinfo
2016-06-11 11:59:51 -06:00
Gregory Nutt
cf14f8d1b5
drivers/: Fixes to spacing and alignement
2015-10-10 10:41:00 -06:00
Gregory Nutt
205260d5e2
Reanem kzalloc to kmm_zalloc for consistency
2014-08-31 17:34:44 -06:00
Gregory Nutt
54fa3b0b59
Rename kfree to kmm_free for consistency with other naming conventions
2014-08-31 17:04:02 -06:00
Gregory Nutt
d119e4c977
Update TODO list and comments
2014-04-23 13:02:00 -06:00
Gregory Nutt
f97be5131c
Various fixes to the recent, big procfs checkin
2013-12-12 11:08:20 -06:00
Gregory Nutt
e4471dc8e0
procfs/: Extenstive architectural changes and enhancements by Ken Pettit
2013-12-12 09:21:55 -06:00
Gregory Nutt
3faa880ef1
MTD NAND: Beginning of software ECC logic
2013-11-18 09:43:44 -06:00
Gregory Nutt
897572a552
Moved include/nuttx/mtd.h to include/nuttx/mtd/mtd.h
2013-11-15 11:22:23 -06:00
Gregory Nutt
adeb33fdd2
Fix erase block vs page block confusion in MTD partition logic. From Ken Pettit
2013-10-31 10:40:10 -06:00
Gregory Nutt
72179b7773
Rearchitecting of some MTD, partition, SMART interfaces, and FLASH drivers to: Better use the byte write capbility when available and to use smaller erase sectors for the erase sector size when available).
2013-05-03 12:52:33 -06:00
Gregory Nutt
4f15d37b62
Add support for the byte write method to MTD partition logic; Beef up the MTD partition test -- and fix resulting bugs detected
2013-05-02 08:07:42 -06:00
Gregory Nutt
99c2cfc168
Add an optional byte-oriented write method to the MTD interface
2013-05-01 10:59:57 -06:00
Gregory Nutt
5d4af79ea0
Incorporate comments from Ken Petit
2013-04-30 17:02:34 -06:00
Gregory Nutt
4d4ece78af
Add MTD partition support plus fix some typos in comments
2013-04-30 12:37:34 -06:00