fs: ignore O_TRUNC open flag for devices
The O_TRUNC flag has to be ignored when opening devices. Otherwise
cp /somefile /dev/somedev fails. This is broken since:

| commit d4f5bb1
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Sat Sep 28 13:12:50 2013 +0200
|
|     copy_file: Add missing O_TRUNC
|
|     Without it, when copying a smaller file over a larger file the
|     resulting file still has the remaining space from the larger file.
|
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 577de19 commit c42b867f4bfa25b3b5a0ee25a30975e8e1d874e5
@Sascha Hauer Sascha Hauer authored on 16 Oct 2013
Showing 1 changed file
View
fs/fs.c