diff options
author | Max Kellermann <max@duempel.org> | 2009-10-08 15:22:39 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-10-08 15:22:39 +0200 |
commit | ecb118f1edab572a904890eddafd3b11c0a79a79 (patch) | |
tree | 4e273cd64778fcff80250b3b33ffb050a257c981 /src/volume.c | |
parent | 1e663b186998ffdeef9b3b9775558e9378bad342 (diff) | |
download | mpd-ecb118f1edab572a904890eddafd3b11c0a79a79.tar.gz mpd-ecb118f1edab572a904890eddafd3b11c0a79a79.tar.xz mpd-ecb118f1edab572a904890eddafd3b11c0a79a79.zip |
state_file: save only if something has changed
If nothing has changed since the last save, don't save the state
file. Saving will spin up the hard drive, which is undesirable on
hosts where MPD is idling in background.
Diffstat (limited to '')
-rw-r--r-- | src/volume.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/volume.c b/src/volume.c index 5f4a66837..8b33f592d 100644 --- a/src/volume.c +++ b/src/volume.c @@ -122,3 +122,9 @@ void save_sw_volume_state(FILE *fp) { fprintf(fp, SW_VOLUME_STATE "%u\n", volume_software_set); } + +unsigned +sw_volume_state_get_hash(void) +{ + return volume_software_set; +} |