Skip to content

Commit 01e6f71

Browse files
authored
Merge pull request #5 from umjammer/0.2.11v
0.2.11v
2 parents b85f844 + f72f9d3 commit 01e6f71

33 files changed

+364
-299
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ jobs:
3030

3131
steps:
3232
- name: Checkout repository
33-
uses: actions/checkout@v2
33+
uses: actions/checkout@v3
3434

3535
# Initializes the CodeQL tools for scanning.
3636
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@v1
37+
uses: github/codeql-action/init@v2
3838
with:
3939
languages: ${{ matrix.language }}
4040
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -43,18 +43,18 @@ jobs:
4343
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4444

4545
- name: Set up JDK 8
46-
uses: actions/setup-java@v2
46+
uses: actions/setup-java@v3
4747
with:
4848
java-version: 8
49-
distribution: 'adopt'
49+
distribution: 'temurin'
5050
cache: maven
5151

5252
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5353
# If this step fails, then you should remove it and run the build manually (see below)
54-
- name: Build
54+
- name: Build with Maven
5555
run: |
5656
mkdir tmp
57-
mvn -B package --file pom.xml -DskipTest
57+
mvn -B package --file pom.xml -Dmaven.test.skip=true
5858
5959
- name: Perform CodeQL Analysis
60-
uses: github/codeql-action/analyze@v1
60+
uses: github/codeql-action/analyze@v2

.github/workflows/maven.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v2
19-
- name: Set up JDK 8
20-
uses: actions/setup-java@v2
21-
with:
22-
java-version: '8'
23-
distribution: 'adopt'
24-
cache: maven
25-
26-
- name: Build with Maven
27-
run: |
28-
mkdir tmp
29-
mvn -B package --file pom.xml
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
21+
- name: Check w/o SNAPSHOT when "bump version"
22+
if: ${{ contains(github.event.head_commit.message, 'bump version') }}
23+
run: grep "<version>" pom.xml | head -1 | grep -v SNAPSHOT
24+
25+
- name: Set up JDK 8
26+
uses: actions/setup-java@v3
27+
with:
28+
java-version: '8'
29+
distribution: 'temurin'
30+
cache: maven
31+
32+
- name: Build with Maven
33+
run: |
34+
mkdir tmp
35+
mvn -B package --file pom.xml

README.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,29 @@ A Java NIO FileSystem implementation based on [jnode](https://github.com/jnode/j
1010

1111
## Status
1212

13-
| fs | list | upload | download | copy | move | rm | mkdir | cache | watch | comment |
14-
|------------------------------|------|--------|----------|------|------|----|-------|-------|-------|-------------------------------------------------------|
15-
| nfs2 | | | | | | | | | | |
16-
| exfat || | | | | | | | | |
17-
| iso9660 | | | | | | | | | | |
18-
| jfat || | | | | | | | | |
19-
| ext2 | | | | | | | | | | |
20-
| hfs | | | | | | | | | | |
21-
| ftpfs | | | | | | | | | | [edtFTPj](https://enterprisedt.com/products/edtftpj/) |
22-
| smbfs | | | | | | | | | | [jcifs-ng](https://github.com/AgNO3/jcifs-ng) |
23-
| ntfs | | | | | | | | | | |
24-
| fat | | | | | | | | | | |
25-
| hfsplus | | | | | | | | | | |
13+
| fs | list | upload | download | copy | move | rm | mkdir | cache | watch | comment |
14+
|------------------------------|------|--------|----------|------|------|-----|-------|-------|-------|-------------------------------------------------------|
15+
| nfs2 | | | | | | | | | | |
16+
| exfat || | | | | | | | | |
17+
| iso9660 | | | | | | | | | | |
18+
| jfat || | | | | | | | | |
19+
| ext2 | | | | | | | | | | |
20+
| hfs | | | | | | | | | | |
21+
| ftpfs | | | | | | | | | | [edtFTPj](https://enterprisedt.com/products/edtftpj/) |
22+
| smbfs | | | | | | | | | | [jcifs-ng](https://github.com/AgNO3/jcifs-ng) |
23+
| ntfs | | | | | | | | | | |
24+
| fat | | | | | | | | | | |
25+
| hfsplus | | | | | | | | | | |
2626
||||||||
27-
| apm | | | | | | | | | | partition |
28-
| gpt | | | | | | | | | | partition |
29-
| ibm (dmg:jfat(fat16)) || | | | | | | | | partition |
30-
| pc98 (jfat(fat16)) || | | | | | | | | partition |
31-
| raw (exfat) || | | | | | | | | virtual partition |
32-
| vdisk (nhd:pc98:fat16) || | | | | | | | | [virtual disk](vavi-nio-file-emu), partition |
33-
| fuse (vdisk(nhd):pc98:fat16) || | | | | | | | | [fuse](vavi-net-fuse), virtualDisk, partition |
34-
27+
| apm | | | | | | | | | | partition |
28+
| gpt | | | | | | | | | | partition |
29+
| ibm (dmg:jfat(fat16)) || | | | | | | | | partition |
30+
| pc98 (jfat(fat16)) || | | | | | | | | partition |
31+
| raw (exfat) || | | | | | | | | virtual partition |
32+
| vdisk (nhd:pc98:fat16) || | | | | | | | | [virtual disk](vavi-nio-file-emu), partition |
33+
| fuse (vdisk(nhd):pc98:fat16) || | | | | | | | | [fuse](vavi-net-fuse), virtualDisk, partition |
34+
| vdisk (d88:pc98:n88) | 🚧 | | | | | | | | | not solid image is not supported by DeviceAPI |
35+
| vdisk (fdi:pc98:fat12) || | | | | | | | | [virtual disk](vavi-nio-file-emu), partition |
3536

3637
## for emulator user
3738

@@ -41,4 +42,10 @@ we can see nostalgic files `autoexec.bat`, `command.com`, `mifes...` etc.
4142

4243
time stamps are so old lol.
4344

44-
![](https://lh3.googleusercontent.com/pw/AM-JKLVzJc46TaLOLtacSQdNJF-11XE6gw1eBN-57aIazw22VK1HHsPIoXNO3cVjHWnnEq36bjJxFBiRP3ipe57fXTfpITi8-FybMbTvpHXR-X2ZzQ2MI-HirwnI1PCyhpL6pUb8SDbCRBOyzr_sHRUKMxZB=w1024-h981-no?authuser=0)
45+
![](https://lh3.googleusercontent.com/pw/AM-JKLVzJc46TaLOLtacSQdNJF-11XE6gw1eBN-57aIazw22VK1HHsPIoXNO3cVjHWnnEq36bjJxFBiRP3ipe57fXTfpITi8-FybMbTvpHXR-X2ZzQ2MI-HirwnI1PCyhpL6pUb8SDbCRBOyzr_sHRUKMxZB=w1024-h981-no?authuser=0)
46+
47+
## TODO
48+
49+
* `BlockDeviceAPI` can only support \[header\] + solid image
50+
* api separation from device is in high esteem
51+
* however we need accessing disk data by logical sector No. but offset like `BiosDeviceAPI` for emu disks like d88

core/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
<parent>
55
<groupId>vavi</groupId>
66
<artifactId>vavi-nio-file-jnode</artifactId>
7-
<version>0.2.10v</version>
7+
<version>0.2.11v</version>
88
</parent>
9+
910
<artifactId>jnode-core</artifactId>
1011
<packaging>jar</packaging>
1112

fs/pom.xml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
23
<modelVersion>4.0.0</modelVersion>
34

45
<parent>
56
<groupId>vavi</groupId>
67
<artifactId>vavi-nio-file-jnode</artifactId>
7-
<version>0.2.10v</version>
8+
<version>0.2.11v</version>
89
</parent>
10+
911
<artifactId>jnode-fs</artifactId>
1012
<packaging>jar</packaging>
1113

1214
<properties>
1315
<vavi-net-fuse.groupId>com.github.umjammer.vavi-apps-fuse</vavi-net-fuse.groupId>
14-
<vavi-net-fuse.version>0.1.7</vavi-net-fuse.version>
16+
<vavi-net-fuse.version>0.1.8</vavi-net-fuse.version>
1517
</properties>
1618

1719
<build>
@@ -55,24 +57,30 @@
5557
<dependency>
5658
<groupId>vavi</groupId>
5759
<artifactId>jnode-core</artifactId>
58-
<version>0.2.10v</version>
60+
<version>0.2.11v</version>
5961
</dependency>
6062
<dependency>
6163
<!--for nfs -->
6264
<groupId>vavi</groupId>
6365
<artifactId>jnode-net</artifactId>
64-
<version>0.2.10v</version>
66+
<version>0.2.11v</version>
6567
</dependency>
6668

6769
<dependency>
6870
<groupId>com.github.umjammer</groupId>
6971
<artifactId>java7-fs-base</artifactId>
70-
<version>0.0.12v</version>
72+
<version>0.0.13v</version>
7173
</dependency>
7274
<dependency>
7375
<groupId>vavi</groupId>
7476
<artifactId>vavi-nio-file-emu</artifactId>
75-
<version>2.0.1</version>
77+
<version>2.0.3</version>
78+
<exclusions>
79+
<exclusion>
80+
<groupId>com.github.umjammer</groupId>
81+
<artifactId>vavi-awt</artifactId>
82+
</exclusion>
83+
</exclusions>
7684
</dependency>
7785

7886
<dependency>

fs/src/main/java/org/jnode/driver/block/BlockDeviceAPI.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626

2727
/**
2828
* The API for block devices.
29-
*
29+
* <p>
30+
* this api is able to access only solid disk images.
3031
* @author epr
3132
*/
3233
public interface BlockDeviceAPI extends DeviceAPI {

fs/src/main/java/org/jnode/driver/block/FileDevice.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.io.IOException;
2626
import java.io.RandomAccessFile;
2727
import java.nio.ByteBuffer;
28+
import java.util.logging.Level;
2829

2930
import org.apache.logging.log4j.LogManager;
3031
import org.apache.logging.log4j.Logger;
@@ -54,7 +55,7 @@ public class FileDevice extends Device implements FSBlockDeviceAPI {
5455
*/
5556
public void addOffset(long offset) {
5657
this.offset += offset;
57-
Debug.printf("offset: %08x + %08x -> %08x", (this.offset - offset), offset, this.offset);
58+
Debug.printf(Level.FINE, "offset: %08x + %08x -> %08x", (this.offset - offset), offset, this.offset);
5859
}
5960

6061
/**

fs/src/main/java/org/jnode/driver/block/VirtualDiskDevice.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.io.FileNotFoundException;
1010
import java.io.IOException;
1111
import java.nio.ByteBuffer;
12+
import java.util.logging.Level;
1213

1314
import org.jnode.driver.Device;
1415
import org.jnode.partitions.PartitionTableEntry;
@@ -32,7 +33,7 @@ public class VirtualDiskDevice extends Device implements FSBlockDeviceAPI {
3233
/** for partition entry */
3334
public void addOffset(long offset) {
3435
this.offset += offset;
35-
Debug.printf("offset: %08x + %08x -> %08x", (this.offset - offset), offset, this.offset);
36+
Debug.printf(Level.FINE, "offset: %08x + %08x -> %08x", (this.offset - offset), offset, this.offset);
3637
}
3738

3839
/** virtual offset */

fs/src/main/java/org/jnode/fs/BlockDeviceFileSystemType.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
package org.jnode.fs;
2222

2323
import java.util.ServiceLoader;
24+
import java.util.logging.Level;
2425

2526
import org.jnode.driver.block.FSBlockDeviceAPI;
2627
import org.jnode.partitions.PartitionTableEntry;
@@ -49,9 +50,9 @@ static <T extends FileSystemType> T lookup(PartitionTableEntry pte, byte[] first
4950
ServiceLoader<FileSystemType> sl = ServiceLoader.load(FileSystemType.class);
5051
for (FileSystemType fst : sl) {
5152
if (fst instanceof BlockDeviceFileSystemType) {
52-
Debug.println("filesystem type: " + fst);
53-
BlockDeviceFileSystemType bfst = (BlockDeviceFileSystemType) fst;
54-
if (bfst.supports(pte, firstSector, devApi)) {
53+
Debug.println(Level.FINE, "filesystem type: " + fst);
54+
BlockDeviceFileSystemType bdfst = (BlockDeviceFileSystemType) fst;
55+
if (bdfst.supports(pte, firstSector, devApi)) {
5556
return (T) fst;
5657
}
5758
}

fs/src/main/java/org/jnode/fs/hfs/HfsWrapperFileSystemType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public String getScheme() {
9191
public final boolean supports(final PartitionTableEntry pte, final byte[] firstSectors,
9292
final FSBlockDeviceAPI devApi) {
9393

94-
if (firstSectors.length < 0x400) {
94+
if (firstSectors.length < 0x400 + 162) {
9595
// Not enough data for detection
9696
return false;
9797
}

0 commit comments

Comments
 (0)