check if partition is mounted before mkfs
authorGoldwyn Rodrigues <rgoldwyn@gmail.com>
Tue, 1 Apr 2008 14:36:46 +0000 (10:36 -0400)
committerDavid Woodhouse <dwmw2@hera.kernel.org>
Tue, 1 Apr 2008 14:36:46 +0000 (10:36 -0400)
commitc2c5e3e7e533b1b03ba68723ef8ab7274d07148a
tree1b5527cebdc3ae994e385bd57d5de0019312048c
parentad67cd73b7c1ab043f0c27570750f6d2becd7f03
check if partition is mounted before mkfs

This saves from the blunder of formatting a live mounted filesystem.
This can be extended to get the mount flags of the filesystem
mounted.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@gmail.com>
mkfs.c
utils.c
utils.h