From 706c7d3be254105f9c1efbef9c91f5ddf3c9d99c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 27 May 2024 10:08:20 +0200 Subject: [PATCH] avoid /boot ... if people use a sd card from a camera --- libgphoto2_port/disk/disk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgphoto2_port/disk/disk.c b/libgphoto2_port/disk/disk.c index 832f9bcca8..2929e527ff 100644 --- a/libgphoto2_port/disk/disk.c +++ b/libgphoto2_port/disk/disk.c @@ -110,6 +110,8 @@ gp_port_library_list (GPPortInfoList *list) (NULL != strstr(mntent->mnt_type,"sysfs"))|| (NULL != strstr(mntent->mnt_type,"cifs"))|| (NULL != strstr(mntent->mnt_type,"afs")) || + /* avoid some dirs */ + (0 == strncmp(mntent->mnt_dir,"/boot",5)) || /* mount options */ /* x-systemd.automount or similar */ (NULL != strstr(mntent->mnt_opts,"automount")) @@ -182,6 +184,8 @@ gp_port_library_list (GPPortInfoList *list) (NULL != strstr(mntent->mnt_type,"sysfs"))|| (NULL != strstr(mntent->mnt_type,"cifs"))|| (NULL != strstr(mntent->mnt_type,"afs")) || + /* avoid some dirs */ + (0 == strncmp(mntent->mnt_dir,"/boot",5)) || /* options */ (NULL != strstr(mntent->mnt_opts,"automount")) ) {