diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-16 10:29:28 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-16 10:29:28 +0200 |
commit | 056a695c15e83f4a85305482fadea67f76fb7528 (patch) | |
tree | 9d94794fa65bab3f8787605a2e3cf3ca4466b72f /fs/devfs.c | |
parent | be6790838d92ebe130f8b66637cef72e40a7b704 (diff) | |
download | barebox-056a695c15e83f4a85305482fadea67f76fb7528.tar.gz barebox-056a695c15e83f4a85305482fadea67f76fb7528.tar.xz |
implement flash protection
Diffstat (limited to 'fs/devfs.c')
-rw-r--r-- | fs/devfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/devfs.c b/fs/devfs.c index aafcc34439..4fc0dbb91b 100644 --- a/fs/devfs.c +++ b/fs/devfs.c @@ -50,6 +50,13 @@ static int devfs_erase(struct device_d *_dev, FILE *f, size_t count, unsigned lo return dev_erase(dev, count, offset); } +static int devfs_protect(struct device_d *_dev, FILE *f, size_t count, unsigned long offset, int prot) +{ + struct device_d *dev = f->inode; + + return dev_protect(dev, count, offset, prot); +} + static int devfs_memmap(struct device_d *_dev, FILE *f, void **map, int flags) { struct device_d *dev = f->inode; @@ -153,6 +160,7 @@ static struct fs_driver_d devfs_driver = { .closedir = devfs_closedir, .stat = devfs_stat, .erase = devfs_erase, + .protect = devfs_protect, .memmap = devfs_memmap, .flags = FS_DRIVER_NO_DEV, .drv = { |