7 Commits

Author SHA1 Message Date
alhimik45
04d0c03641 bump version 2020-08-29 16:50:04 +03:00
alhimik45
69e39dc188 fix examples to work with NULL buffer on getting extended attributes 2020-08-29 16:29:06 +03:00
alhimik45
91c4e1784d fix incorrect processing of zero size in listxattr 2020-08-29 16:22:10 +03:00
alhimik45
c3094cf652 update to stable version of Mono.Posix.NETStandard 2019-04-21 02:23:10 +05:00
alhimik45
1e156ff368 add extra Include path for building native libs 2019-04-21 01:56:32 +05:00
alhimik45
ca6a607d01 remove debug line from HelloFs 2018-01-05 14:05:26 +07:00
alhimik45
990463cdd2 fix folder name 2018-01-05 02:00:57 +07:00
13 changed files with 24 additions and 17 deletions

View File

@@ -1,3 +1,6 @@
2018-01-05 Alexey Kolpakov <mail@alhimik.me>
Port to .Net Standard 2
2016-06-08 Justin Needham <jneedhamspkt@gmail.com>
Migrate from gmcs to mcs for Mono 4.*
* configure.ac: gmcs --> mcs

View File

@@ -8,7 +8,7 @@
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0-beta3" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Mono.Fuse.NETStandard\Mono.Fuse.NETStandard.csproj" />

View File

@@ -10,7 +10,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedirectFS", "example\Redir
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedirectFS-FH", "example\RedirectFS-FH\RedirectFS-FH.csproj", "{1D5F7569-C773-422B-B783-3F1775816D45}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{85A3668F-D9E7-4794-8723-4F3767008CB9}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "example", "example", "{85A3668F-D9E7-4794-8723-4F3767008CB9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@@ -1316,7 +1316,7 @@ namespace Mono.Fuse.NETStandard {
}
if (size == 0)
bytesWritten = bytesNeeded;
if (size < (ulong) bytesNeeded) {
else if (size < (ulong) bytesNeeded) {
errno = Errno.ERANGE;
}
else {

View File

@@ -3,8 +3,8 @@
<AssemblyTitle>Mono.Fuse.NETStandard.dll</AssemblyTitle>
<AssemblyName>Mono.Fuse.NETStandard</AssemblyName>
<PackageId>Mono.Fuse.NETStandard</PackageId>
<PackageVersion>1.0.0-pre2</PackageVersion>
<PackageLicenseUrl>https://raw.githubusercontent.com/alhimik45/Mono.Fuse.NETStandard/master/LICENSE</PackageLicenseUrl>
<PackageVersion>1.1.0</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/alhimik45/Mono.Fuse.NETStandard</PackageProjectUrl>
<RepositoryUrl>https://github.com/alhimik45/Mono.Fuse.NETStandard</RepositoryUrl>
<RepositoryType>git</RepositoryType>
@@ -21,6 +21,6 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0-beta3" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -4,4 +4,4 @@ This is a .NET Standard binding for FUSE, port of [mono-fuse](https://github.com
For documentation see [here](http://www.jprl.com/Projects/mono-fuse/docs/).
To run examples clone this repository, run `build-libs.sh` and then run projects from `examples/` folder.
To run examples clone this repository, run `build-libs.sh` and then run projects from `example/` folder.

View File

@@ -22,7 +22,7 @@ build_managed () {
build_native () {
dotnet run -p CreateNativeMap/CreateNativeMap.csproj -c "$CONFIGURATION" --library=MonoFuseHelper "Mono.Fuse.NETStandard/bin/$CONFIGURATION/netstandard2.0/Mono.Fuse.NETStandard.dll" buildlibs/map
INCLUDES="-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/fuse -Ibuildlibs/"
INCLUDES="-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/fuse -I/usr/lib/glib-2.0/include -Ibuildlibs/"
libtool --mode=compile gcc -D_FILE_OFFSET_BITS=64 $INCLUDES -g -O2 -MT buildlibs/mfh.lo -MD -MP -c -o buildlibs/mfh.lo MonoFuseHelper/mfh.c
libtool --mode=compile gcc -D_FILE_OFFSET_BITS=64 $INCLUDES -g -O2 -MT buildlibs/map.lo -MD -MP -c -o buildlibs/map.lo buildlibs/map.c
libtool --mode=link gcc -g -O2 -no-undefined -avoid-version -o buildlibs/libMonoFuseHelper.la -rpath /usr/local/lib buildlibs/mfh.lo buildlibs/map.lo -lglib-2.0 -lfuse -pthread

View File

@@ -52,7 +52,6 @@ namespace Mono.Fuse.NETStandard.Samples {
public HelloFs ()
{
Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));
Trace.WriteLine ("(HelloFS creating)");
hello_attrs ["foo"] = Encoding.UTF8.GetBytes ("bar");
}
@@ -167,10 +166,15 @@ namespace Mono.Fuse.NETStandard.Samples {
return 0;
_value = hello_attrs [name];
}
if (value.Length < _value.Length) {
return Errno.ERANGE;
if (value != null)
{
if (value.Length < _value.Length) {
return Errno.ERANGE;
}
Array.Copy(_value, value, _value.Length);
}
Array.Copy (_value, value, _value.Length);
bytesWritten = _value.Length;
return 0;
}

View File

@@ -13,6 +13,6 @@
<ProjectReference Include="..\..\Mono.Fuse.NETStandard\Mono.Fuse.NETStandard.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0-beta3" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -337,7 +337,7 @@ namespace Mono.Fuse.NETStandard.Samples {
protected override Errno OnGetPathExtendedAttribute (string path, string name, byte[] value, out int bytesWritten)
{
int r = bytesWritten = (int) Syscall.lgetxattr (basedir+path, name, value, (ulong) value.Length);
int r = bytesWritten = (int) Syscall.lgetxattr (basedir+path, name, value, (ulong) (value?.Length ?? 0));
if (r == -1)
return Stdlib.GetLastError ();
return 0;

View File

@@ -19,6 +19,6 @@
<ProjectReference Include="..\..\Mono.Fuse.NETStandard\Mono.Fuse.NETStandard.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0-beta3" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@@ -284,7 +284,7 @@ namespace Mono.Fuse.NETStandard.Samples {
protected override Errno OnGetPathExtendedAttribute (string path, string name, byte[] value, out int bytesWritten)
{
int r = bytesWritten = (int) Syscall.lgetxattr (basedir+path, name, value, (ulong) value.Length);
int r = bytesWritten = (int) Syscall.lgetxattr (basedir+path, name, value, (ulong) (value?.Length ?? 0));
if (r == -1)
return Stdlib.GetLastError ();
return 0;

View File

@@ -19,6 +19,6 @@
<ProjectReference Include="..\..\Mono.Fuse.NETStandard\Mono.Fuse.NETStandard.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0-beta3" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
</ItemGroup>
</Project>