Update detach helper for current sysfs interface

Writing 'suspend' to power/level doesn't seem to work these days
(worked in F12 but broken in F13). Also use the new remove/ sysfs
attribute.
Add a --disable-remote-access option

Certain Enterprise Linux vendors might not want to support the udisks
1.0.x ABI for seven years.
We're using the UDISKS_ prefix, not DKD_

Also pointed out in

http://bugs.freedesktop.org/show_bug.cgi?id=26720
Bug 24424 - Move UDISKS_MEDIA_AVAILABLE out of the part table prober

This change (magically) makes floppy disks work in GNOME. Woot.
Include stdout in mkfs error output

This is to help expose this bug

 mke2fs insists on user interaction even if stdin is not a tty and -F is passed
 https://bugzilla.redhat.com/show_bug.cgi?id=569021
fix media detection of CD-ROMs

Use ID_CDROM_MEDIA property for media detection in update_info(), not
ID_CDROM_MEDIA_STATE. The latter is not set by udev's cdrom_id for pure CD-ROM
media (since it's sometimes wrong), and we are already using ID_CDROM_MEDIA in
our udev rules, so let's be consistent here.

This was exposed by commit c8d02e0, which previously shadowed this bug.
Bug 26822 — Fix benchmarking for large files

Use lseek64() instead of lseek() in job-drive-benchmark.c (as in the rest of
the code), to also work with large devices.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Bug 26725 — add profiling

Add a PROFILE() macro (src/profile.h) which, when building with
--enable-profiling, adds fake access() calls as trace points for startup speed
profiling.

http://people.gnome.org/~federico/news-2006-03.html#login-time-2 describes how
to use strace and turn its output into a nice graph:

  # strace -tttfo /tmp/trace src/udisks-daemon
  [...]
  $ plot-timeline.py -o /tmp/trace.png /tmp/trace

Instrument the most important/complex methods in daemon.c and device.c, and
main().
Initialize variable before use
in maintainer mode, build with -Werror

With --enable-maintainer-mode, or with --enable-strict, build with -Werror.
fix compiler warnings

Fix a couple of unchecked function call results, and a strict pointer aliasing
violation, which resulted in compiler warnings.
Update .gitignore files
Include profile.h in dist tarball

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Include udisks-tcp-bridge.xml in dist tarball

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Respect DM_UDEV_DISABLE_DISK_RULES_FLAG from current LVM
Drop obsolete rules for private LVM devices

udisks-dm-export does not set UDISKS_DM_{UUID,NAME} any more, and recent LVM
versions check and flag private devices themselves, so just drop our own rules
for that.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Drop obsolete rule for suspended LVM devices

udisks-dm-export does not set UDISKS_DM_{STATE,NAME} any more, and recent LVM
versions check and flag private devices themselves, so just drop our own rules
for that.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
testsuite: Ensure that volumes on raw partitions don't have a partition table

This reproduces bz#26996.
Bug 26996 — wrongly detects partition on unpartitioned VFAT device

A standard VFAT header matches the signature of an MBR, so we detected
VFAT file systems on raw unpartitioned devices as both VFAT and MBR partition
table. This confuses gnome-disk-utility/gvfs, and causes them to be ignored in
GNOME.

The standard approach in the kernel/blkid is to only detect an MBR if it does
not have a valid VFAT signature. Since blkid already does that for us, just
skip the udisks-part-id invocation completely if we already know that we have a
valid ID_FS_TYPE.
Update TODO