diff --git a/arch/arm/src/cxd56xx/cxd56_geofence.c b/arch/arm/src/cxd56xx/cxd56_geofence.c index f5b5bb7592c..0dc32b65cdc 100644 --- a/arch/arm/src/cxd56xx/cxd56_geofence.c +++ b/arch/arm/src/cxd56xx/cxd56_geofence.c @@ -106,6 +106,7 @@ static const struct file_operations g_geofencefops = NULL, /* write */ NULL, /* seek */ cxd56_geofence_ioctl, /* ioctl */ + NULL, /* truncate */ cxd56_geofence_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/arch/arm/src/cxd56xx/cxd56_gnss.c b/arch/arm/src/cxd56xx/cxd56_gnss.c index 826da673aae..04270f14775 100644 --- a/arch/arm/src/cxd56xx/cxd56_gnss.c +++ b/arch/arm/src/cxd56xx/cxd56_gnss.c @@ -317,6 +317,7 @@ static const struct file_operations g_gnssfops = cxd56_gnss_write, /* write */ NULL, /* seek */ cxd56_gnss_ioctl, /* ioctl */ + NULL, /* truncate */ cxd56_gnss_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/arch/arm/src/cxd56xx/cxd56_hostif.c b/arch/arm/src/cxd56xx/cxd56_hostif.c index ec217d03bd7..905c1baf682 100644 --- a/arch/arm/src/cxd56xx/cxd56_hostif.c +++ b/arch/arm/src/cxd56xx/cxd56_hostif.c @@ -145,6 +145,7 @@ static const struct file_operations g_hif_fops = hif_write, /* write */ hif_seek, /* seek */ hif_ioctl, /* ioctl */ + NULL, /* truncate */ hif_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , hif_unlink /* unlink */ diff --git a/arch/arm/src/sama5/sam_tsd.c b/arch/arm/src/sama5/sam_tsd.c index 4c6e925f5bd..3e2adab4dbd 100644 --- a/arch/arm/src/sama5/sam_tsd.c +++ b/arch/arm/src/sama5/sam_tsd.c @@ -249,6 +249,7 @@ static const struct file_operations g_tsdops = NULL, /* write */ NULL, /* seek */ sam_tsd_ioctl, /* ioctl */ + NULL, /* truncate */ sam_tsd_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c b/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c index 3dd6553b9b1..c612ab8c54c 100644 --- a/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c +++ b/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c @@ -296,6 +296,7 @@ static const struct file_operations g_slcdops = slcd_write, /* write */ NULL, /* seek */ slcd_ioctl, /* ioctl */ + NULL, /* truncate */ slcd_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c index 5e3725e7edb..0a9b57e28da 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c @@ -268,6 +268,7 @@ static const struct file_operations tc_fops = NULL, /* write */ NULL, /* seek */ tc_ioctl, /* ioctl */ + NULL, /* truncate */ tc_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c b/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c index d4859819c20..5778631ff0c 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c +++ b/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c @@ -346,6 +346,7 @@ static const struct file_operations g_slcdops = slcd_write, /* write */ NULL, /* seek */ slcd_ioctl, /* ioctl */ + NULL, /* truncate */ slcd_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c index 7684c58e574..9ae2554986d 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c +++ b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c @@ -249,6 +249,7 @@ static const struct file_operations tc_fops = NULL, /* write */ NULL, /* seek */ tc_ioctl, /* ioctl */ + NULL, /* truncate */ tc_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c index 1baf1a8cf03..50cb3f99e98 100644 --- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c +++ b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c @@ -181,6 +181,7 @@ static const struct file_operations g_lcdops = lcd_write, /* write */ NULL, /* seek */ lcd_ioctl, /* ioctl */ + NULL, /* truncate */ lcd_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/crypto/cryptodev.c b/crypto/cryptodev.c index b524804b2f1..44eb9410e87 100644 --- a/crypto/cryptodev.c +++ b/crypto/cryptodev.c @@ -125,6 +125,7 @@ static const struct file_operations g_cryptofops = cryptof_write, /* write */ NULL, /* seek */ cryptof_ioctl, /* ioctl */ + NULL, /* truncate */ cryptof_poll /* poll */ }; @@ -136,6 +137,7 @@ static const struct file_operations g_cryptoops = NULL, /* write */ NULL, /* seek */ cryptoioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ }; diff --git a/drivers/analog/adc.c b/drivers/analog/adc.c index 0d9cc43bd5d..099e7b4d172 100644 --- a/drivers/analog/adc.c +++ b/drivers/analog/adc.c @@ -72,6 +72,7 @@ static const struct file_operations g_adc_fops = NULL, /* write */ NULL, /* seek */ adc_ioctl, /* ioctl */ + NULL, /* truncate */ adc_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/analog/comp.c b/drivers/analog/comp.c index 3bec7547437..1fb32f18de6 100644 --- a/drivers/analog/comp.c +++ b/drivers/analog/comp.c @@ -65,6 +65,7 @@ static const struct file_operations comp_fops = NULL, /* write */ NULL, /* seek */ comp_ioctl, /* ioctl */ + NULL, /* truncate */ comp_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/bch/bchdev_driver.c b/drivers/bch/bchdev_driver.c index d807822cce6..83fc4250d38 100644 --- a/drivers/bch/bchdev_driver.c +++ b/drivers/bch/bchdev_driver.c @@ -78,6 +78,7 @@ const struct file_operations bch_fops = bch_write, /* write */ bch_seek, /* seek */ bch_ioctl, /* ioctl */ + NULL, /* truncate */ bch_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , bch_unlink /* unlink */ diff --git a/drivers/can/can.c b/drivers/can/can.c index 69ca540382d..b19cb36f26f 100644 --- a/drivers/can/can.c +++ b/drivers/can/can.c @@ -135,6 +135,7 @@ static const struct file_operations g_canops = can_write, /* write */ NULL, /* seek */ can_ioctl, /* ioctl */ + NULL, /* truncate */ can_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/crypto/dev_urandom.c b/drivers/crypto/dev_urandom.c index 0137fdfaf3f..8796f7445b6 100644 --- a/drivers/crypto/dev_urandom.c +++ b/drivers/crypto/dev_urandom.c @@ -100,6 +100,7 @@ static const struct file_operations g_urand_fops = devurand_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ devurand_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/i2c/i2c_driver.c b/drivers/i2c/i2c_driver.c index 5a7c4c9f3b9..b7836b73274 100644 --- a/drivers/i2c/i2c_driver.c +++ b/drivers/i2c/i2c_driver.c @@ -99,6 +99,7 @@ static const struct file_operations i2cdrvr_fops = i2cdrvr_write, /* write */ NULL, /* seek */ i2cdrvr_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , i2cdrvr_unlink /* unlink */ diff --git a/drivers/input/ads7843e.c b/drivers/input/ads7843e.c index 8cf4e9ff166..19126b3b6b4 100644 --- a/drivers/input/ads7843e.c +++ b/drivers/input/ads7843e.c @@ -122,6 +122,7 @@ static const struct file_operations ads7843e_fops = NULL, /* write */ NULL, /* seek */ ads7843e_ioctl, /* ioctl */ + NULL, /* truncate */ ads7843e_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/ajoystick.c b/drivers/input/ajoystick.c index ef81fd86741..072d90615ee 100644 --- a/drivers/input/ajoystick.c +++ b/drivers/input/ajoystick.c @@ -135,6 +135,7 @@ static const struct file_operations ajoy_fops = NULL, /* write */ NULL, /* seek */ ajoy_ioctl, /* ioctl */ + NULL, /* truncate */ ajoy_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/button_upper.c b/drivers/input/button_upper.c index 10117aa2d40..16b578bbf99 100644 --- a/drivers/input/button_upper.c +++ b/drivers/input/button_upper.c @@ -133,6 +133,7 @@ static const struct file_operations btn_fops = btn_write, /* write */ NULL, /* seek */ btn_ioctl, /* ioctl */ + NULL, /* truncate */ btn_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/cypress_mbr3108.c b/drivers/input/cypress_mbr3108.c index 2fe4b6b5847..39189b9329c 100644 --- a/drivers/input/cypress_mbr3108.c +++ b/drivers/input/cypress_mbr3108.c @@ -224,6 +224,7 @@ static const struct file_operations g_mbr3108_fileops = mbr3108_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ mbr3108_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/djoystick.c b/drivers/input/djoystick.c index d2ba83a841e..13365fd7a50 100644 --- a/drivers/input/djoystick.c +++ b/drivers/input/djoystick.c @@ -135,6 +135,7 @@ static const struct file_operations djoy_fops = NULL, /* write */ NULL, /* seek */ djoy_ioctl, /* ioctl */ + NULL, /* truncate */ djoy_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/ft5x06.c b/drivers/input/ft5x06.c index 478b362d042..8898f8e5d4b 100644 --- a/drivers/input/ft5x06.c +++ b/drivers/input/ft5x06.c @@ -176,6 +176,7 @@ static const struct file_operations ft5x06_fops = NULL, /* write */ NULL, /* seek */ ft5x06_ioctl, /* ioctl */ + NULL, /* truncate */ ft5x06_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/keyboard_upper.c b/drivers/input/keyboard_upper.c index 6ed9758ff13..c874a3a04f3 100644 --- a/drivers/input/keyboard_upper.c +++ b/drivers/input/keyboard_upper.c @@ -88,6 +88,7 @@ static const struct file_operations g_keyboard_fops = keyboard_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ keyboard_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/max11802.c b/drivers/input/max11802.c index 517cc3d58e0..b0d69eb3903 100644 --- a/drivers/input/max11802.c +++ b/drivers/input/max11802.c @@ -115,6 +115,7 @@ static const struct file_operations max11802_fops = NULL, /* write */ NULL, /* seek */ max11802_ioctl, /* ioctl */ + NULL, /* truncate */ max11802_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/mxt.c b/drivers/input/mxt.c index 4daf8da771f..5050bcda50e 100644 --- a/drivers/input/mxt.c +++ b/drivers/input/mxt.c @@ -280,6 +280,7 @@ static const struct file_operations mxt_fops = NULL, /* write */ NULL, /* seek */ mxt_ioctl, /* ioctl */ + NULL, /* truncate */ mxt_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/spq10kbd.c b/drivers/input/spq10kbd.c index 6a9cab82ba9..91597439cd2 100644 --- a/drivers/input/spq10kbd.c +++ b/drivers/input/spq10kbd.c @@ -255,6 +255,7 @@ static const struct file_operations g_hidkbd_fops = spq10kbd_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ spq10kbd_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/stmpe811_tsc.c b/drivers/input/stmpe811_tsc.c index 89851b6070c..6e82fed382f 100644 --- a/drivers/input/stmpe811_tsc.c +++ b/drivers/input/stmpe811_tsc.c @@ -124,6 +124,7 @@ static const struct file_operations g_stmpe811fops = NULL, /* write */ NULL, /* seek */ stmpe811_ioctl, /* ioctl */ + NULL, /* truncate */ stmpe811_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/touchscreen_upper.c b/drivers/input/touchscreen_upper.c index a1239452e3f..48dc7038a68 100644 --- a/drivers/input/touchscreen_upper.c +++ b/drivers/input/touchscreen_upper.c @@ -90,6 +90,7 @@ static const struct file_operations g_touch_fops = touch_write, /* write */ NULL, /* seek */ touch_ioctl, /* ioctl */ + NULL, /* truncate */ touch_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/input/tsc2007.c b/drivers/input/tsc2007.c index 2b799b0c07c..5a1afd55afd 100644 --- a/drivers/input/tsc2007.c +++ b/drivers/input/tsc2007.c @@ -209,6 +209,7 @@ static const struct file_operations tsc2007_fops = NULL, /* write */ NULL, /* seek */ tsc2007_ioctl, /* ioctl */ + NULL, /* truncate */ tsc2007_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/lcd/ft80x.c b/drivers/lcd/ft80x.c index 9880b524941..6950b39c7fe 100644 --- a/drivers/lcd/ft80x.c +++ b/drivers/lcd/ft80x.c @@ -134,6 +134,7 @@ static const struct file_operations g_ft80x_fops = ft80x_write, /* write */ NULL, /* seek */ ft80x_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , ft80x_unlink /* unlink */ diff --git a/drivers/lcd/pcf8574_lcd_backpack.c b/drivers/lcd/pcf8574_lcd_backpack.c index 07dd614bafc..a27179386a8 100644 --- a/drivers/lcd/pcf8574_lcd_backpack.c +++ b/drivers/lcd/pcf8574_lcd_backpack.c @@ -117,6 +117,7 @@ static const struct file_operations g_pcf8574_lcd_fops = pcf8574_lcd_write, /* write */ pcf8574_lcd_seek, /* seek */ pcf8574_lcd_ioctl, /* ioctl */ + NULL, /* truncate */ pcf8574_lcd_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , pcf8574_lcd_unlink /* unlink */ diff --git a/drivers/lcd/tda19988.c b/drivers/lcd/tda19988.c index f07c662a09c..f8e0b06eb68 100644 --- a/drivers/lcd/tda19988.c +++ b/drivers/lcd/tda19988.c @@ -170,6 +170,7 @@ static const struct file_operations tda19988_fops = tda19988_write, /* write */ tda19988_seek, /* seek */ tda19988_ioctl, /* ioctl */ + NULL, /* truncate */ tda19988_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , tda19988_unlink /* unlink */ diff --git a/drivers/misc/dev_null.c b/drivers/misc/dev_null.c index da6fc348637..5b84c8a436f 100644 --- a/drivers/misc/dev_null.c +++ b/drivers/misc/dev_null.c @@ -57,6 +57,7 @@ static const struct file_operations devnull_fops = devnull_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ devnull_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/misc/dev_zero.c b/drivers/misc/dev_zero.c index 097e79d1c5c..b02ba215596 100644 --- a/drivers/misc/dev_zero.c +++ b/drivers/misc/dev_zero.c @@ -57,6 +57,7 @@ static const struct file_operations devzero_fops = devzero_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ devzero_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/misc/rpmsgdev.c b/drivers/misc/rpmsgdev.c index 9df1ba0c865..96eb5934112 100644 --- a/drivers/misc/rpmsgdev.c +++ b/drivers/misc/rpmsgdev.c @@ -165,6 +165,7 @@ const struct file_operations g_rpmsgdev_ops = rpmsgdev_write, /* write */ rpmsgdev_seek, /* seek */ rpmsgdev_ioctl, /* ioctl */ + NULL, /* truncate */ rpmsgdev_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/modem/alt1250/alt1250.c b/drivers/modem/alt1250/alt1250.c index 0c0654d6f77..6978432a531 100644 --- a/drivers/modem/alt1250/alt1250.c +++ b/drivers/modem/alt1250/alt1250.c @@ -77,6 +77,7 @@ static const struct file_operations g_alt1250fops = NULL, /* write */ NULL, /* seek */ alt1250_ioctl, /* ioctl */ + NULL, /* truncate */ alt1250_poll, /* poll */ }; static uint8_t g_recvbuff[ALTCOM_RX_PKT_SIZE_MAX]; diff --git a/drivers/modem/u-blox.c b/drivers/modem/u-blox.c index b858a4a0729..fbd3d38ad35 100644 --- a/drivers/modem/u-blox.c +++ b/drivers/modem/u-blox.c @@ -114,6 +114,7 @@ static const struct file_operations ubxmdm_fops = ubxmdm_write, /* write */ NULL, /* seek */ ubxmdm_ioctl, /* ioctl */ + NULL, /* truncate */ ubxmdm_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/mtd/mtd_config.c b/drivers/mtd/mtd_config.c index f63521f705e..4e74433a598 100644 --- a/drivers/mtd/mtd_config.c +++ b/drivers/mtd/mtd_config.c @@ -119,6 +119,7 @@ static const struct file_operations mtdconfig_fops = NULL, /* write */ NULL, /* seek */ mtdconfig_ioctl, /* ioctl */ + NULL, /* truncate */ mtdconfig_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/mtd/mtd_config_fs.c b/drivers/mtd/mtd_config_fs.c index ccfeb250a54..cb6153e2488 100644 --- a/drivers/mtd/mtd_config_fs.c +++ b/drivers/mtd/mtd_config_fs.c @@ -141,6 +141,7 @@ static const struct file_operations g_mtdnvs_fops = NULL, /* Write */ NULL, /* Seek */ mtdconfig_ioctl, /* Ioctl */ + NULL, /* Truncate */ mtdconfig_poll /* Poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* Unlink */ diff --git a/drivers/net/telnet.c b/drivers/net/telnet.c index a8bf6637303..2b922a08d60 100644 --- a/drivers/net/telnet.c +++ b/drivers/net/telnet.c @@ -190,6 +190,7 @@ static const struct file_operations g_telnet_fops = telnet_write, /* write */ NULL, /* seek */ telnet_ioctl, /* ioctl */ + NULL, /* truncate */ telnet_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ @@ -204,6 +205,7 @@ static const struct file_operations g_factory_fops = factory_write, /* write */ NULL, /* seek */ factory_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 751efeaf2dc..cab2d1f325c 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -219,6 +219,7 @@ static const struct file_operations g_tun_file_ops = tun_write, /* write */ NULL, /* seek */ tun_ioctl, /* ioctl */ + NULL, /* truncate */ tun_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/pipes/fifo.c b/drivers/pipes/fifo.c index 61010d3a1e5..7ad5c4358cb 100644 --- a/drivers/pipes/fifo.c +++ b/drivers/pipes/fifo.c @@ -47,6 +47,7 @@ static const struct file_operations g_fifo_fops = pipecommon_write, /* write */ NULL, /* seek */ pipecommon_ioctl, /* ioctl */ + NULL, /* truncate */ pipecommon_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , pipecommon_unlink /* unlink */ diff --git a/drivers/pipes/pipe.c b/drivers/pipes/pipe.c index 999a55a7f36..67050f9176f 100644 --- a/drivers/pipes/pipe.c +++ b/drivers/pipes/pipe.c @@ -61,6 +61,7 @@ static const struct file_operations g_pipe_fops = pipecommon_write, /* write */ NULL, /* seek */ pipecommon_ioctl, /* ioctl */ + NULL, /* truncate */ pipecommon_poll /* poll */ }; diff --git a/drivers/power/battery/battery_charger.c b/drivers/power/battery/battery_charger.c index c7d2e373981..edfc8c4c29e 100644 --- a/drivers/power/battery/battery_charger.c +++ b/drivers/power/battery/battery_charger.c @@ -91,6 +91,7 @@ static const struct file_operations g_batteryops = bat_charger_write, /* write */ NULL, /* seek */ bat_charger_ioctl, /* ioctl */ + NULL, /* truncate */ bat_charger_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/power/battery/battery_gauge.c b/drivers/power/battery/battery_gauge.c index ae09ed49fc0..37b01cb9c48 100644 --- a/drivers/power/battery/battery_gauge.c +++ b/drivers/power/battery/battery_gauge.c @@ -93,6 +93,7 @@ static const struct file_operations g_batteryops = bat_gauge_write, /* write */ NULL, /* seek */ bat_gauge_ioctl, /* ioctl */ + NULL, /* truncate */ bat_gauge_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/power/battery/battery_monitor.c b/drivers/power/battery/battery_monitor.c index 8d3499d436b..77e19808689 100644 --- a/drivers/power/battery/battery_monitor.c +++ b/drivers/power/battery/battery_monitor.c @@ -92,6 +92,7 @@ static const struct file_operations g_batteryops = bat_monitor_write, /* write */ NULL, /* seek */ bat_monitor_ioctl, /* ioctl */ + NULL, /* truncate */ bat_monitor_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/rc/lirc_dev.c b/drivers/rc/lirc_dev.c index 38cd34e1e63..d4911fae41e 100644 --- a/drivers/rc/lirc_dev.c +++ b/drivers/rc/lirc_dev.c @@ -103,6 +103,7 @@ static const struct file_operations g_lirc_fops = lirc_write, /* write */ NULL, /* seek */ lirc_ioctl, /* ioctl */ + NULL, /* truncate */ lirc_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/sensors/aht10.c b/drivers/sensors/aht10.c index 8b79b3deac5..529ce0140ea 100644 --- a/drivers/sensors/aht10.c +++ b/drivers/sensors/aht10.c @@ -116,6 +116,7 @@ static const struct file_operations g_aht10fops = aht10_write, /* write */ NULL, /* seek */ aht10_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , aht10_unlink /* unlink */ diff --git a/drivers/sensors/hc_sr04.c b/drivers/sensors/hc_sr04.c index 5f637bf4b68..f4cfd377261 100644 --- a/drivers/sensors/hc_sr04.c +++ b/drivers/sensors/hc_sr04.c @@ -90,6 +90,7 @@ static const struct file_operations g_hcsr04ops = hcsr04_write, /* write */ NULL, /* seek */ hcsr04_ioctl, /* ioctl */ + NULL, /* truncate */ hcsr04_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/sensors/hdc1008.c b/drivers/sensors/hdc1008.c index b6a78277dc6..612011ebb2d 100644 --- a/drivers/sensors/hdc1008.c +++ b/drivers/sensors/hdc1008.c @@ -161,6 +161,7 @@ static const struct file_operations g_hdc1008fops = hdc1008_write, /* write */ NULL, /* seek */ hdc1008_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , hdc1008_unlink /* unlink */ diff --git a/drivers/sensors/hts221.c b/drivers/sensors/hts221.c index 71f0c166340..9e02fbe00f0 100644 --- a/drivers/sensors/hts221.c +++ b/drivers/sensors/hts221.c @@ -157,6 +157,7 @@ static const struct file_operations g_humidityops = hts221_write, /* write */ NULL, /* seek */ hts221_ioctl, /* ioctl */ + NULL, /* truncate */ hts221_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/sensors/lis2dh.c b/drivers/sensors/lis2dh.c index 7869480abab..efdd81e5358 100644 --- a/drivers/sensors/lis2dh.c +++ b/drivers/sensors/lis2dh.c @@ -154,6 +154,7 @@ static const struct file_operations g_lis2dhops = lis2dh_write, /* write */ NULL, /* seek */ lis2dh_ioctl, /* ioctl */ + NULL, /* truncate */ lis2dh_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/sensors/max44009.c b/drivers/sensors/max44009.c index fcbe397b9d4..45a6fb6bae0 100644 --- a/drivers/sensors/max44009.c +++ b/drivers/sensors/max44009.c @@ -112,6 +112,7 @@ static const struct file_operations g_alsops = max44009_write, /* write */ NULL, /* seek */ max44009_ioctl, /* ioctl */ + NULL, /* truncate */ max44009_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/sensors/scd30.c b/drivers/sensors/scd30.c index febb52e66e9..063a346b35b 100644 --- a/drivers/sensors/scd30.c +++ b/drivers/sensors/scd30.c @@ -182,6 +182,7 @@ static const struct file_operations g_scd30fops = scd30_write, /* write */ NULL, /* seek */ scd30_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , scd30_unlink /* unlink */ diff --git a/drivers/sensors/scd41.c b/drivers/sensors/scd41.c index 015b8f319b8..272f37f5af8 100644 --- a/drivers/sensors/scd41.c +++ b/drivers/sensors/scd41.c @@ -190,6 +190,7 @@ static const struct file_operations g_scd41fops = scd41_write, /* write */ NULL, /* seek */ scd41_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , scd41_unlink /* unlink */ diff --git a/drivers/sensors/sensor.c b/drivers/sensors/sensor.c index 0ca7184839c..4a93b4f11a0 100644 --- a/drivers/sensors/sensor.c +++ b/drivers/sensors/sensor.c @@ -167,6 +167,7 @@ static const struct file_operations g_sensor_fops = sensor_write, /* write */ NULL, /* seek */ sensor_ioctl, /* ioctl */ + NULL, /* truncate */ sensor_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/sensors/sgp30.c b/drivers/sensors/sgp30.c index b013d8228fb..493a0af4d74 100644 --- a/drivers/sensors/sgp30.c +++ b/drivers/sensors/sgp30.c @@ -159,6 +159,7 @@ static const struct file_operations g_sgp30fops = sgp30_write, /* write */ NULL, /* seek */ sgp30_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , sgp30_unlink /* unlink */ diff --git a/drivers/sensors/sht21.c b/drivers/sensors/sht21.c index de59fc2a523..a23b58ebfca 100644 --- a/drivers/sensors/sht21.c +++ b/drivers/sensors/sht21.c @@ -131,6 +131,7 @@ static const struct file_operations g_sht21fops = sht21_write, /* write */ NULL, /* seek */ sht21_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , sht21_unlink /* unlink */ diff --git a/drivers/sensors/sht3x.c b/drivers/sensors/sht3x.c index 15d781490f1..11dd183480e 100644 --- a/drivers/sensors/sht3x.c +++ b/drivers/sensors/sht3x.c @@ -170,6 +170,7 @@ static const struct file_operations g_sht3xfops = sht3x_write, /* write */ NULL, /* seek */ sht3x_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , sht3x_unlink /* unlink */ diff --git a/drivers/sensors/sps30.c b/drivers/sensors/sps30.c index ed7e47a3f1d..ad176cbe11f 100644 --- a/drivers/sensors/sps30.c +++ b/drivers/sensors/sps30.c @@ -175,6 +175,7 @@ static const struct file_operations g_sps30fops = sps30_write, /* write */ NULL, /* seek */ sps30_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , sps30_unlink /* unlink */ diff --git a/drivers/sensors/usensor.c b/drivers/sensors/usensor.c index 3974abd31fa..08fd9f791f7 100644 --- a/drivers/sensors/usensor.c +++ b/drivers/sensors/usensor.c @@ -81,6 +81,7 @@ static const struct file_operations g_usensor_fops = usensor_write, /* write */ NULL, /* seek */ usensor_ioctl, /* ioctl */ + NULL, /* truncate */ NULL, /* poll */ }; diff --git a/drivers/serial/pty.c b/drivers/serial/pty.c index a9181ecdb72..39a182cdd79 100644 --- a/drivers/serial/pty.c +++ b/drivers/serial/pty.c @@ -127,6 +127,7 @@ static const struct file_operations g_pty_fops = pty_write, /* write */ NULL, /* seek */ pty_ioctl, /* ioctl */ + NULL, /* truncate */ pty_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , pty_unlink /* unlink */ diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 37e9e0aca73..ed7299b8aad 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -126,6 +126,7 @@ static const struct file_operations g_serialops = uart_write, /* write */ NULL, /* seek */ uart_ioctl, /* ioctl */ + NULL, /* truncate */ uart_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/serial/uart_bth4.c b/drivers/serial/uart_bth4.c index 8978bd5312e..e01a27331ff 100644 --- a/drivers/serial/uart_bth4.c +++ b/drivers/serial/uart_bth4.c @@ -90,6 +90,7 @@ static const struct file_operations g_uart_bth4_ops = uart_bth4_write, /* write */ NULL, /* seek */ uart_bth4_ioctl, /* ioctl */ + NULL, /* truncate */ uart_bth4_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/spi/spi_driver.c b/drivers/spi/spi_driver.c index 767eaec3142..ae3a09726d6 100644 --- a/drivers/spi/spi_driver.c +++ b/drivers/spi/spi_driver.c @@ -99,6 +99,7 @@ static const struct file_operations spidrvr_fops = spidrvr_write, /* write */ NULL, /* seek */ spidrvr_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , spidrvr_unlink /* unlink */ diff --git a/drivers/spi/spi_slave_driver.c b/drivers/spi/spi_slave_driver.c index 61f0e6c0e96..54b4f5ac20d 100644 --- a/drivers/spi/spi_slave_driver.c +++ b/drivers/spi/spi_slave_driver.c @@ -127,6 +127,7 @@ static const struct file_operations g_spislavefops = spi_slave_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , spi_slave_unlink /* unlink */ diff --git a/drivers/syslog/ramlog.c b/drivers/syslog/ramlog.c index dfc3e7dad06..a47c7347422 100644 --- a/drivers/syslog/ramlog.c +++ b/drivers/syslog/ramlog.c @@ -114,6 +114,7 @@ static const struct file_operations g_ramlogfops = ramlog_file_write, /* write */ NULL, /* seek */ ramlog_file_ioctl, /* ioctl */ + NULL, /* truncate */ ramlog_file_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/timers/rtc.c b/drivers/timers/rtc.c index 04507b917bc..c0055c12f0d 100644 --- a/drivers/timers/rtc.c +++ b/drivers/timers/rtc.c @@ -129,6 +129,7 @@ static const struct file_operations rtc_fops = rtc_write, /* write */ NULL, /* seek */ rtc_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , rtc_unlink /* unlink */ diff --git a/drivers/usbdev/adb.c b/drivers/usbdev/adb.c index 888e4bd4d17..3fdf8f082b5 100755 --- a/drivers/usbdev/adb.c +++ b/drivers/usbdev/adb.c @@ -254,6 +254,7 @@ static const struct file_operations g_adb_fops = adb_char_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ adb_char_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/usbhost/usbhost_cdcmbim.c b/drivers/usbhost/usbhost_cdcmbim.c index a59ecce3239..c4f7540edba 100644 --- a/drivers/usbhost/usbhost_cdcmbim.c +++ b/drivers/usbhost/usbhost_cdcmbim.c @@ -347,6 +347,7 @@ static const struct file_operations cdcwdm_fops = cdcwdm_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ cdcwdm_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/usbhost/usbhost_hidkbd.c b/drivers/usbhost/usbhost_hidkbd.c index 9d91aa9eaa1..be1f8e3ce5c 100644 --- a/drivers/usbhost/usbhost_hidkbd.c +++ b/drivers/usbhost/usbhost_hidkbd.c @@ -341,6 +341,7 @@ static const struct file_operations g_hidkbd_fops = usbhost_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ usbhost_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/usbhost/usbhost_hidmouse.c b/drivers/usbhost/usbhost_hidmouse.c index 770f061401b..c44574fc210 100644 --- a/drivers/usbhost/usbhost_hidmouse.c +++ b/drivers/usbhost/usbhost_hidmouse.c @@ -391,6 +391,7 @@ static const struct file_operations g_hidmouse_fops = usbhost_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ usbhost_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/usbhost/usbhost_xboxcontroller.c b/drivers/usbhost/usbhost_xboxcontroller.c index cc8c0b3fefc..0531f38f396 100644 --- a/drivers/usbhost/usbhost_xboxcontroller.c +++ b/drivers/usbhost/usbhost_xboxcontroller.c @@ -296,6 +296,7 @@ static const struct file_operations g_xboxcontroller_fops = usbhost_write, /* write */ NULL, /* seek */ usbhost_ioctl, /* ioctl */ + NULL, /* truncate */ usbhost_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/usbmisc/fusb301.c b/drivers/usbmisc/fusb301.c index 48b86e76d9b..565a9ae8d62 100644 --- a/drivers/usbmisc/fusb301.c +++ b/drivers/usbmisc/fusb301.c @@ -94,6 +94,7 @@ static const struct file_operations g_fusb301ops = fusb301_write, /* write */ NULL, /* seek */ fusb301_ioctl, /* ioctl */ + NULL, /* truncate */ fusb301_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/usbmisc/fusb303.c b/drivers/usbmisc/fusb303.c index 9d94840c76c..19bb9ae7101 100644 --- a/drivers/usbmisc/fusb303.c +++ b/drivers/usbmisc/fusb303.c @@ -128,6 +128,7 @@ static const struct file_operations g_fusb303ops = fusb303_write, /* write */ NULL, /* seek */ fusb303_ioctl, /* ioctl */ + NULL, /* truncate */ fusb303_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/usrsock/usrsock_dev.c b/drivers/usrsock/usrsock_dev.c index 34a8ad3cca0..30d46b58ccd 100644 --- a/drivers/usrsock/usrsock_dev.c +++ b/drivers/usrsock/usrsock_dev.c @@ -103,6 +103,7 @@ static const struct file_operations g_usrsockdevops = usrsockdev_write, /* write */ usrsockdev_seek, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ usrsockdev_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/video/fb.c b/drivers/video/fb.c index bc7fd7b5bc3..b401599432a 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -85,6 +85,7 @@ static const struct file_operations fb_fops = fb_write, /* write */ fb_seek, /* seek */ fb_ioctl, /* ioctl */ + NULL, /* truncate */ fb_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/video/video.c b/drivers/video/video.c index 110012e4e46..94f894aa100 100644 --- a/drivers/video/video.c +++ b/drivers/video/video.c @@ -284,6 +284,7 @@ static const struct file_operations g_video_fops = video_write, /* write */ NULL, /* seek */ video_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/wireless/cc1101.c b/drivers/wireless/cc1101.c index 4787c35d1a7..9b0633c77ce 100644 --- a/drivers/wireless/cc1101.c +++ b/drivers/wireless/cc1101.c @@ -305,6 +305,7 @@ static const struct file_operations g_cc1101ops = cc1101_file_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ cc1101_file_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c index d16183bb0b6..25c3400e73e 100644 --- a/drivers/wireless/gs2200m.c +++ b/drivers/wireless/gs2200m.c @@ -231,6 +231,7 @@ static const struct file_operations g_gs2200m_fops = gs2200m_write, /* write */ NULL, /* seek */ gs2200m_ioctl, /* ioctl */ + NULL, /* truncate */ gs2200m_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/wireless/lpwan/sx127x/sx127x.c b/drivers/wireless/lpwan/sx127x/sx127x.c index 3388e2ce9f3..8f00f4e486e 100644 --- a/drivers/wireless/lpwan/sx127x/sx127x.c +++ b/drivers/wireless/lpwan/sx127x/sx127x.c @@ -451,6 +451,7 @@ static const struct file_operations sx127x_fops = sx127x_write, /* write */ NULL, /* seek */ sx127x_ioctl, /* ioctl */ + NULL, /* truncate */ sx127x_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/drivers/wireless/nrf24l01.c b/drivers/wireless/nrf24l01.c index 9779532d1ce..383ca7e6589 100644 --- a/drivers/wireless/nrf24l01.c +++ b/drivers/wireless/nrf24l01.c @@ -239,6 +239,7 @@ static const struct file_operations nrf24l01_fops = nrf24l01_write, /* write */ NULL, /* seek */ nrf24l01_ioctl, /* ioctl */ + NULL, /* truncate */ nrf24l01_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/fs/binfs/fs_binfs.c b/fs/binfs/fs_binfs.c index c10d9ff3dd7..abb8647c860 100644 --- a/fs/binfs/fs_binfs.c +++ b/fs/binfs/fs_binfs.c @@ -109,12 +109,12 @@ const struct mountpt_operations binfs_operations = NULL, /* write */ NULL, /* seek */ binfs_ioctl, /* ioctl */ + NULL, /* truncate */ NULL, /* sync */ binfs_dup, /* dup */ binfs_fstat, /* fstat */ NULL, /* fchstat */ - NULL, /* truncate */ binfs_opendir, /* opendir */ binfs_closedir, /* closedir */ diff --git a/fs/cromfs/fs_cromfs.c b/fs/cromfs/fs_cromfs.c index 3f08a6d4825..84f8184d698 100644 --- a/fs/cromfs/fs_cromfs.c +++ b/fs/cromfs/fs_cromfs.c @@ -184,12 +184,12 @@ const struct mountpt_operations cromfs_operations = NULL, /* write */ NULL, /* seek */ cromfs_ioctl, /* ioctl */ + NULL, /* truncate */ NULL, /* sync */ cromfs_dup, /* dup */ cromfs_fstat, /* fstat */ NULL, /* fchstat */ - NULL, /* truncate */ cromfs_opendir, /* opendir */ cromfs_closedir, /* closedir */ diff --git a/fs/fat/fs_fat32.c b/fs/fat/fs_fat32.c index c0163af64af..aef7d5856b6 100644 --- a/fs/fat/fs_fat32.c +++ b/fs/fat/fs_fat32.c @@ -115,12 +115,11 @@ const struct mountpt_operations fat_operations = fat_write, /* write */ fat_seek, /* seek */ fat_ioctl, /* ioctl */ - + fat_truncate, /* truncate */ fat_sync, /* sync */ fat_dup, /* dup */ fat_fstat, /* fstat */ NULL, /* fchstat */ - fat_truncate, /* truncate */ fat_opendir, /* opendir */ fat_closedir, /* closedir */ diff --git a/fs/hostfs/hostfs.c b/fs/hostfs/hostfs.c index b6e50ddb4e3..de380b2f35e 100644 --- a/fs/hostfs/hostfs.c +++ b/fs/hostfs/hostfs.c @@ -142,12 +142,12 @@ const struct mountpt_operations hostfs_operations = hostfs_write, /* write */ hostfs_seek, /* seek */ hostfs_ioctl, /* ioctl */ + hostfs_ftruncate, /* ftruncate */ hostfs_sync, /* sync */ hostfs_dup, /* dup */ hostfs_fstat, /* fstat */ hostfs_fchstat, /* fchstat */ - hostfs_ftruncate, /* ftruncate */ hostfs_opendir, /* opendir */ hostfs_closedir, /* closedir */ diff --git a/fs/littlefs/lfs_vfs.c b/fs/littlefs/lfs_vfs.c index 49bf16cf620..9022c0c76c0 100644 --- a/fs/littlefs/lfs_vfs.c +++ b/fs/littlefs/lfs_vfs.c @@ -140,12 +140,12 @@ const struct mountpt_operations littlefs_operations = littlefs_write, /* write */ littlefs_seek, /* seek */ littlefs_ioctl, /* ioctl */ + littlefs_truncate, /* truncate */ littlefs_sync, /* sync */ littlefs_dup, /* dup */ littlefs_fstat, /* fstat */ NULL, /* fchstat */ - littlefs_truncate, /* truncate */ littlefs_opendir, /* opendir */ littlefs_closedir, /* closedir */ diff --git a/fs/mqueue/mq_open.c b/fs/mqueue/mq_open.c index 6158e23e1c6..74c78e82f36 100644 --- a/fs/mqueue/mq_open.c +++ b/fs/mqueue/mq_open.c @@ -60,6 +60,7 @@ static const struct file_operations g_nxmq_fileops = NULL, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ nxmq_file_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/fs/nfs/nfs_vfsops.c b/fs/nfs/nfs_vfsops.c index 73f2b5fa869..e75aac5d410 100644 --- a/fs/nfs/nfs_vfsops.c +++ b/fs/nfs/nfs_vfsops.c @@ -198,12 +198,12 @@ const struct mountpt_operations nfs_operations = nfs_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + nfs_truncate, /* truncate */ NULL, /* sync */ nfs_dup, /* dup */ nfs_fstat, /* fstat */ nfs_fchstat, /* fchstat */ - nfs_truncate, /* truncate */ nfs_opendir, /* opendir */ nfs_closedir, /* closedir */ diff --git a/fs/nxffs/nxffs_initialize.c b/fs/nxffs/nxffs_initialize.c index c594bd83857..01964038f8a 100644 --- a/fs/nxffs/nxffs_initialize.c +++ b/fs/nxffs/nxffs_initialize.c @@ -54,17 +54,17 @@ const struct mountpt_operations nxffs_operations = nxffs_write, /* write */ NULL, /* seek -- Use f_pos in struct file */ nxffs_ioctl, /* ioctl */ - - NULL, /* sync -- No buffered data */ - nxffs_dup, /* dup */ - nxffs_fstat, /* fstat */ - NULL, /* fchstat */ #ifdef __NO_TRUNCATE_SUPPORT__ nxffs_truncate, /* truncate */ #else NULL, /* truncate */ #endif + NULL, /* sync -- No buffered data */ + nxffs_dup, /* dup */ + nxffs_fstat, /* fstat */ + NULL, /* fchstat */ + nxffs_opendir, /* opendir */ nxffs_closedir, /* closedir */ nxffs_readdir, /* readdir */ diff --git a/fs/procfs/fs_procfs.c b/fs/procfs/fs_procfs.c index 76be8222223..ee5276d00c7 100644 --- a/fs/procfs/fs_procfs.c +++ b/fs/procfs/fs_procfs.c @@ -252,12 +252,12 @@ const struct mountpt_operations procfs_operations = procfs_write, /* write */ NULL, /* seek */ procfs_ioctl, /* ioctl */ + NULL, /* truncate */ NULL, /* sync */ procfs_dup, /* dup */ procfs_fstat, /* fstat */ NULL, /* fchstat */ - NULL, /* truncate */ procfs_opendir, /* opendir */ procfs_closedir, /* closedir */ diff --git a/fs/romfs/fs_romfs.c b/fs/romfs/fs_romfs.c index ad439a91e1a..91fceacf8dc 100644 --- a/fs/romfs/fs_romfs.c +++ b/fs/romfs/fs_romfs.c @@ -119,6 +119,7 @@ const struct mountpt_operations romfs_operations = NULL, /* write */ romfs_seek, /* seek */ romfs_ioctl, /* ioctl */ + NULL, /* truncate */ NULL, /* sync */ romfs_dup, /* dup */ diff --git a/fs/rpmsgfs/rpmsgfs.c b/fs/rpmsgfs/rpmsgfs.c index 50a71a9af1d..c35984098f0 100644 --- a/fs/rpmsgfs/rpmsgfs.c +++ b/fs/rpmsgfs/rpmsgfs.c @@ -161,12 +161,12 @@ const struct mountpt_operations rpmsgfs_operations = rpmsgfs_write, /* write */ rpmsgfs_seek, /* seek */ rpmsgfs_ioctl, /* ioctl */ + rpmsgfs_ftruncate, /* ftruncate */ rpmsgfs_sync, /* sync */ rpmsgfs_dup, /* dup */ rpmsgfs_fstat, /* fstat */ rpmsgfs_fchstat, /* fchstat */ - rpmsgfs_ftruncate, /* ftruncate */ rpmsgfs_opendir, /* opendir */ rpmsgfs_closedir, /* closedir */ diff --git a/fs/smartfs/smartfs_smart.c b/fs/smartfs/smartfs_smart.c index a9b22c761f5..f5735cea05f 100644 --- a/fs/smartfs/smartfs_smart.c +++ b/fs/smartfs/smartfs_smart.c @@ -140,12 +140,12 @@ const struct mountpt_operations smartfs_operations = smartfs_write, /* write */ smartfs_seek, /* seek */ smartfs_ioctl, /* ioctl */ + smartfs_truncate, /* truncate */ smartfs_sync, /* sync */ smartfs_dup, /* dup */ smartfs_fstat, /* fstat */ NULL, /* fchstat */ - smartfs_truncate, /* truncate */ smartfs_opendir, /* opendir */ smartfs_closedir, /* closedir */ diff --git a/fs/socket/socket.c b/fs/socket/socket.c index 37e66fc7ced..f18bc489631 100644 --- a/fs/socket/socket.c +++ b/fs/socket/socket.c @@ -64,6 +64,7 @@ static const struct file_operations g_sock_fileops = sock_file_write, /* write */ NULL, /* seek */ sock_file_ioctl, /* ioctl */ + NULL, /* truncate */ sock_file_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/fs/spiffs/src/spiffs_vfs.c b/fs/spiffs/src/spiffs_vfs.c index 369d557a4c5..011f1e53db2 100644 --- a/fs/spiffs/src/spiffs_vfs.c +++ b/fs/spiffs/src/spiffs_vfs.c @@ -141,12 +141,12 @@ const struct mountpt_operations spiffs_operations = spiffs_write, /* write */ spiffs_seek, /* seek */ spiffs_ioctl, /* ioctl */ + spiffs_truncate, /* truncate */ spiffs_sync, /* sync */ spiffs_dup, /* dup */ spiffs_fstat, /* fstat */ NULL, /* fchstat */ - spiffs_truncate, /* truncate */ spiffs_opendir, /* opendir */ spiffs_closedir, /* closedir */ diff --git a/fs/tmpfs/fs_tmpfs.c b/fs/tmpfs/fs_tmpfs.c index dc17b5121cb..4c92eb04a8c 100644 --- a/fs/tmpfs/fs_tmpfs.c +++ b/fs/tmpfs/fs_tmpfs.c @@ -177,12 +177,12 @@ const struct mountpt_operations tmpfs_operations = tmpfs_write, /* write */ tmpfs_seek, /* seek */ tmpfs_ioctl, /* ioctl */ + tmpfs_truncate, /* truncate */ tmpfs_sync, /* sync */ tmpfs_dup, /* dup */ tmpfs_fstat, /* fstat */ NULL, /* fchstat */ - tmpfs_truncate, /* truncate */ tmpfs_opendir, /* opendir */ tmpfs_closedir, /* closedir */ diff --git a/fs/unionfs/fs_unionfs.c b/fs/unionfs/fs_unionfs.c index 3b0b23d4d92..50b2f5ad263 100644 --- a/fs/unionfs/fs_unionfs.c +++ b/fs/unionfs/fs_unionfs.c @@ -222,12 +222,12 @@ const struct mountpt_operations unionfs_operations = unionfs_write, /* write */ unionfs_seek, /* seek */ unionfs_ioctl, /* ioctl */ + unionfs_truncate, /* truncate */ unionfs_sync, /* sync */ unionfs_dup, /* dup */ unionfs_fstat, /* fstat */ unionfs_fchstat, /* fchstat */ - unionfs_truncate, /* truncate */ unionfs_opendir, /* opendir */ unionfs_closedir, /* closedir */ diff --git a/fs/userfs/fs_userfs.c b/fs/userfs/fs_userfs.c index 8dff18f5d4b..303a8571af3 100644 --- a/fs/userfs/fs_userfs.c +++ b/fs/userfs/fs_userfs.c @@ -160,12 +160,12 @@ const struct mountpt_operations userfs_operations = userfs_write, /* write */ userfs_seek, /* seek */ userfs_ioctl, /* ioctl */ + userfs_truncate, /* truncate */ userfs_sync, /* sync */ userfs_dup, /* dup */ userfs_fstat, /* fstat */ userfs_fchstat, /* fchstat */ - userfs_truncate, /* truncate */ userfs_opendir, /* opendir */ userfs_closedir, /* closedir */ diff --git a/fs/vfs/fs_epoll.c b/fs/vfs/fs_epoll.c index 3214207b732..c642333b207 100644 --- a/fs/vfs/fs_epoll.c +++ b/fs/vfs/fs_epoll.c @@ -104,6 +104,7 @@ static const struct file_operations g_epoll_ops = NULL, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ epoll_do_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/fs/vfs/fs_eventfd.c b/fs/vfs/fs_eventfd.c index 30321d20bc6..78610a5de74 100644 --- a/fs/vfs/fs_eventfd.c +++ b/fs/vfs/fs_eventfd.c @@ -100,6 +100,7 @@ static const struct file_operations g_eventfd_fops = eventfd_do_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ #ifdef CONFIG_EVENT_FD_POLL eventfd_do_poll /* poll */ #else diff --git a/fs/vfs/fs_signalfd.c b/fs/vfs/fs_signalfd.c index f8f5741b7a2..6ffa8b1671d 100644 --- a/fs/vfs/fs_signalfd.c +++ b/fs/vfs/fs_signalfd.c @@ -79,6 +79,7 @@ static const struct file_operations g_signalfd_fileops = NULL, /* write */ NULL, /* seek */ NULL, /* ioctl */ + NULL, /* truncate */ signalfd_file_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ diff --git a/fs/vfs/fs_truncate.c b/fs/vfs/fs_truncate.c index 4ecd06c13d4..c4c0297640b 100644 --- a/fs/vfs/fs_truncate.c +++ b/fs/vfs/fs_truncate.c @@ -68,9 +68,14 @@ int file_truncate(FAR struct file *filep, off_t length) */ inode = filep->f_inode; - if (inode == NULL || !INODE_IS_MOUNTPT(inode) || inode->u.i_mops == NULL) + if (inode == NULL) { - fwarn("WARNING: Not a (regular) file on a mounted file system.\n"); + return -EINVAL; + } + + if (inode->u.i_ops == NULL) + { + fwarn("WARNING: Not a file\n"); return -EINVAL; } @@ -78,7 +83,7 @@ int file_truncate(FAR struct file *filep, off_t length) * possible not the only indicator -- sufficient, but not necessary") */ - if (inode->u.i_mops->write == NULL) + if (inode->u.i_ops->write == NULL) { fwarn("WARNING: File system is read-only\n"); return -EROFS; @@ -88,7 +93,7 @@ int file_truncate(FAR struct file *filep, off_t length) * a write-able file system. */ - if (inode->u.i_mops->truncate == NULL) + if (inode->u.i_ops->truncate == NULL) { fwarn("WARNING: File system does not support the truncate() method\n"); return -ENOSYS; @@ -96,7 +101,7 @@ int file_truncate(FAR struct file *filep, off_t length) /* Yes, then tell the file system to truncate this file */ - return inode->u.i_mops->truncate(filep, length); + return inode->u.i_ops->truncate(filep, length); } /**************************************************************************** diff --git a/graphics/nxterm/nxterm_driver.c b/graphics/nxterm/nxterm_driver.c index ddc45450392..594dc975192 100644 --- a/graphics/nxterm/nxterm_driver.c +++ b/graphics/nxterm/nxterm_driver.c @@ -66,6 +66,7 @@ const struct file_operations g_nxterm_drvrops = nxterm_write, /* write */ NULL, /* seek */ nxterm_ioctl, /* ioctl */ + NULL, /* truncate */ nxterm_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , nxterm_unlink /* unlink */ @@ -82,6 +83,7 @@ const struct file_operations g_nxterm_drvrops = nxterm_write, /* write */ NULL, /* seek */ nxterm_ioctl, /* ioctl */ + NULL, /* truncate */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , nxterm_unlink /* unlink */ diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h index 951ad825acb..cf011428f66 100644 --- a/include/nuttx/fs/fs.h +++ b/include/nuttx/fs/fs.h @@ -212,6 +212,7 @@ struct file_operations size_t buflen); off_t (*seek)(FAR struct file *filep, off_t offset, int whence); int (*ioctl)(FAR struct file *filep, int cmd, unsigned long arg); + int (*truncate)(FAR struct file *filep, off_t length); /* The two structures need not be common after this point */ @@ -298,6 +299,7 @@ struct mountpt_operations size_t buflen); off_t (*seek)(FAR struct file *filep, off_t offset, int whence); int (*ioctl)(FAR struct file *filep, int cmd, unsigned long arg); + int (*truncate)(FAR struct file *filep, off_t length); /* The two structures need not be common after this point. The following * are extended methods needed to deal with the unique needs of mounted @@ -311,7 +313,6 @@ struct mountpt_operations int (*fstat)(FAR const struct file *filep, FAR struct stat *buf); int (*fchstat)(FAR const struct file *filep, FAR const struct stat *buf, int flags); - int (*truncate)(FAR struct file *filep, off_t length); /* Directory operations */