diff --git a/ProjectTree b/ProjectTree index eb17c00..d352829 100644 --- a/ProjectTree +++ b/ProjectTree @@ -54,6 +54,7 @@ │   │   ├── boot.h │   │   └── mboot.h │   ├── io +│   │   ├── acpi.h │   │   ├── ata.h │   │   ├── cursor.h │   │   ├── keyb.h @@ -94,6 +95,7 @@ │   │   │   ├── ssp.c │   │   │   └── table.c │   │   ├── io +│   │   │   ├── acpi.c │   │   │   ├── ata.asm │   │   │   ├── ata.c │   │   │   ├── cursor.c @@ -160,4 +162,4 @@ ├── ProjectTree └── README.md -28 directories, 107 files +28 directories, 109 files diff --git a/build/create_disk.sh b/build/create_disk.sh index 89f9b53..018b406 100755 --- a/build/create_disk.sh +++ b/build/create_disk.sh @@ -45,6 +45,12 @@ sudo losetup $lpblock $1 -o 1048576 echo ${CL2}[create_disk.sh]${NC} Sync image... \(sync\)${CL3} sync +if [ -z $lpblock ]; +then + echo No loop device partition to target. Fatal error ! + return 13 +fi + ## Format echo ${CL2}[create_disk.sh]${NC} Formatting image... \(mkdosfs\)${CL3} sudo mkdosfs -F32 -f 2 $lpblock @@ -61,6 +67,19 @@ lpblock=$(sudo losetup -f) sudo losetup $lpblock $1 -o 1048576 lpblockbase=$(sudo losetup -f) sudo losetup $lpblockbase $1 + +if [ -z $lpblockbase ]; +then + echo No loop device to target. Fatal error ! + return 13 +fi + +if [ -z $lpblock ]; +then + echo No loop device partition to target. Fatal error ! + return 13 +fi + sudo udisksctl mount -b $lpblock --no-user-interaction ## Sync