Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
persistence-setup
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tails
persistence-setup
Commits
ffe3e5e8
Commit
ffe3e5e8
authored
Sep 29, 2013
by
Tails developers
Browse files
Options
Downloads
Patches
Plain Diff
Import feature/sdio at commit
2737545b
, as a quilt patch.
parent
f1055dbd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/feature-sdio.1-git2737545.patch
+58
-0
58 additions, 0 deletions
debian/patches/feature-sdio.1-git2737545.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
59 additions
and
0 deletions
debian/patches/feature-sdio.1-git2737545.patch
0 → 100644
+
58
−
0
View file @
ffe3e5e8
diff --git a/lib/Tails/Persistence/Setup.pm b/lib/Tails/Persistence/Setup.pm
index 4f67db9..c946672 100644
--- a/lib/Tails/Persistence/Setup.pm
+++ b/lib/Tails/Persistence/Setup.pm
@@ -31,6 +31,7 @@
use Net::DBus qw(:typing);
use Net::DBus::GLib;
use Net::DBus::Annotation qw(:call);
use List::Util qw{first max};
+use List::MoreUtils qw{any};
use Number::Format qw(:subs);
use Path::Class;
use Tails::Persistence::Utils qw{align_up_at_2MiB align_down_at_2MiB step_name_to_class_name get_variable_from_file};
@@ -480,9 +481,9 @@
sub check_sanity {
my @checks = (
{
- method => 'device_is_usb',
+ method => 'device_is_connected_via_a_supported_interface',
message => $self->encoding->decode(gettext(
- "Tails is running from non-USB device %s.")),
+ "Tails is running from non-USB / non-SDIO device %s.")),
needs_device_arg => 1,
},
{
@@ -571,11 +572,13 @@
sub get_device_property {
->Get('org.freedesktop.DBus.Properties', $property);
}
-sub device_is_usb {
+sub device_is_connected_via_a_supported_interface {
my $self = shift;
my $device = shift;
- 'usb' eq $self->get_device_property($device, 'DriveConnectionInterface');
+ my $iface = $self->get_device_property($device, 'DriveConnectionInterface');
+
+ any { $_ eq $iface } (qw{sdio usb});
}
sub device_is_optical {
@@ -644,8 +647,16 @@
sub partitions {
my $device = shift;
$device ||= $self->device;
+ my $partition_re;
+ if ($device =~ m{mmcblk [0-9]+ \z}xms) {
+ $partition_re = qr{\A$device[p][0-9]+\z};
+ }
+ else {
+ $partition_re = qr{\A$device[0-9]+\z};
+ }
+
grep {
- $_ =~ m{\A $device [0-9]+ \z}xms
+ $_ =~ m{$partition_re}xms
} @{$self->udisks_object->EnumerateDevices()};
}
This diff is collapsed.
Click to expand it.
debian/patches/series
0 → 100644
+
1
−
0
View file @
ffe3e5e8
feature-sdio.1-git2737545.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment