block: cleanup handling "start" action of the "autofs" command
When blockd starts it uses "start" action for getting current state of
block devices. The way main_autofs() was implemented was a bit hacky
though:
1) It was calling mount_device() with TYPE_HOTPLUG
First of all that made code harder to understand. Faking TYPE_HOTPLUG
for a TYPE_AUTOFS made following mount_device() logic more complex.
Secondly the only reason for that seems to be to trigger "swap" and
extroot checks in the mount_device(). Other than that it was only
about calling blockd_notify() anyway.
2) It wasn't consistent
Consider a "swap" or extroot without an "autofs" set (a pretty
expected case).
a) During original TYPE_HOTPLUG event mount_device() would detect
both cases early and return without calling blockd_notify().
b) With previous main_autofs() implementation blockd_notify() was
called for both cases.
With this change main_autofs() doesn't fake TYPE_HOTPLUG and it follows
mount_device() logic which should result in an expected & consistent
state of devices in blockd.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>