karelzak/util-linux — pull request #96 by drinkcat (2014-06-07 13:48:27+00:00)
Title: umount: Make sure exit code does not overflow

POSIX exit code is only 8-bit, and since umount sums up error codes, it can sometimes report success (exit code 0) even though a number of operations failed.

For example, running, in an empty directory:
```
umount `seq 1 7`
```
returns 224 (7*32), since none of the 7 mount point exists but
```
umount `seq 1 8`
```
returns 0 (8*32=256)

This patch clips the return value to 255.