Compare commits

...

5 Commits

Author SHA1 Message Date
Anita Zhang 68f98816cb
Merge pull request #13997 from khfeng/hwdb-dell-vostro5581-ish
hwdb: Mark Intel Sensor Hub's accel sensor on Vostro 5581 as being in…
2019-11-11 17:56:56 -08:00
Anita Zhang 4da0b33511
Merge pull request #13996 from poettering/utc-fix
accept UTC timezone explicitly, even if timezone data is missing
2019-11-11 17:47:43 -08:00
Kai-Heng Feng fe156aeafc hwdb: Mark Intel Sensor Hub's accel sensor on Vostro 5581 as being in the base
This laptop uses the accelerometer as a freefall sensor, so mark it as
in base to prevent screen rotation.
2019-11-12 00:30:46 +08:00
Lennart Poettering 55fd6dca07 time-util: uniquify timezone list, in case UTC is listed in timezone1970.tab, too 2019-11-11 17:06:09 +01:00
Lennart Poettering e8b9e9c470 time-util: always accept UTC as valid timezone
We already handle it specially in get_timezones(), hence we should OK it
here too, even if the timezone file doesn't actually exist.

Prompted by:

https://serverfault.com/questions/991172/invalid-time-zone-utc

(Yes, Ubuntu should install the UTC timezone data unconditionally: it
should not be an option, even if all other timezone data is excluded,
but since it's our business to validate user input but not out business
to validate distros, let's just accept "UTC" unconditionally, it's magic
after all)
2019-11-11 17:05:06 +01:00
2 changed files with 11 additions and 0 deletions

View File

@ -229,6 +229,12 @@ sensor:modalias:acpi:BOSC0200*:dmi:*:svnCube:pnI15-TC:*
sensor:modalias:acpi:*KIOX000A*:dmi:*svn*CytrixTechnology:*pn*Complex11t* sensor:modalias:acpi:*KIOX000A*:dmi:*svn*CytrixTechnology:*pn*Complex11t*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
#########################################
# Dell
#########################################
sensor:modalias:platform:HID-SENSOR-200073:dmi:*svnDell*:pnVostro5581:*
ACCEL_LOCATION=base
######################################### #########################################
# DEXP # DEXP
######################################### #########################################

View File

@ -1258,6 +1258,7 @@ int get_timezones(char ***ret) {
} }
strv_sort(zones); strv_sort(zones);
strv_uniq(zones);
} else if (errno != ENOENT) } else if (errno != ENOENT)
return -errno; return -errno;
@ -1277,6 +1278,10 @@ bool timezone_is_valid(const char *name, int log_level) {
if (isempty(name)) if (isempty(name))
return false; return false;
/* Always accept "UTC" as valid timezone, since it's the fallback, even if user has no timezones installed. */
if (streq(name, "UTC"))
return true;
if (name[0] == '/') if (name[0] == '/')
return false; return false;