Skip to content
Permalink
Browse files

Fix regex for device names like nvme0n1p1 and so on

  • Loading branch information...
Sebastian-Roth committed May 21, 2019
1 parent 7ea956e commit 74966a01ec43c5395a64d55e93a67a99938301f1
Showing with 1 addition and 1 deletion.
  1. +1 −1 Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/procsfdisk.awk
@@ -654,7 +654,7 @@ BEGIN {
partition_names[part_name] = part_name;
# Isolate Partition Number.
# The regex can handle devices like mmcblk0p3
part_number = gensub(/^[^0-9]*[0-9]*[^0-9]+/, "", 1, part_name);
part_number = gensub(/^.*[^0-9]([0-9]+)/, "\\1", 1, part_name);
# Set the partitions number.
partitions[part_name, "number"] = part_number;
# Separate attributes

0 comments on commit 74966a0

Please sign in to comment.
You can’t perform that action at this time.