Fix problem that change smack lable of /run to "*" 78/205178/1 accepted/tizen/unified/20190430.113501 submit/tizen/20190430.052724
authorINSUN PYO <insun.pyo@samsung.com>
Tue, 30 Apr 2019 04:29:49 +0000 (13:29 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Tue, 30 Apr 2019 04:29:49 +0000 (13:29 +0900)
commitf316b1d3fc450a49291f881c065c66bd133923bf
tree77af93c553cb541732876fe3ea94bb8a574f245f
parent9d2a805af8a5a39fe4828a24422f1758bbc28b43
Fix problem that change smack lable of /run to "*"

Pre condition
- USB memory stick formatted with ext4.
- There should be no regular files.

Problem
- Smack lable of /run is changed to "*".

Cause
- "find $MOUNT_DIRECTORY -type f | xargs" return blank if there is no files.
- storaged runs on "/"
- "chsmack -a '*'" changes all files in the current directory.

Solution
- runs xargs with "-r" option.
- Man page of xargs: "If the standard input does not contain any nonblanks, do not run the command.  Normally, the command is run once even if there is no input.  This option is a GNU extension."

Change-Id: I642aaf84ea4752698eaa8be18fd105019779f86a
src/block/mmc-smack-label