Forum > Linux

[SOLVED] Accessing Disks in Linux seems no longer possible with FileOpen

<< < (2/4) > >>


Just tested as root:

No errors!

Suse Tumbleweed,kernel 5.8-0-1


Raspbian also does not give errors. I thought about systemd but that does not seem to matter.

Mmm. Must be something to do with my program then. I am using Linux Mint 19.3 .

I tried it without the other share permission and still got same problem yet my other program seems to work. How very bizarre. I wouldn’t mind but nothing has changed  in code for about 4 years So I am confused as to why it now won’t play nicely.

Anyway at least you guys have confirmed the method is right and it hasn’t become an obselete method so thanks for that

OK, so I just created a bare bones basic new project from scratch, compiled, ran as root, and it does not work for me on Linux Mint 19.3, kernel 5.3.0-62-generic with Lazarus 2.0.4 and FPC 3.0.4. I attach it for reference in the hope someone else with a GUI\Debian based distro could try it for me? I am yet to upgrade my FPC\Lazarus etc but if anyone can try with the latest to see if its different, I'd appreciate it. 

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.Button1Click(Sender: TObject);var  SourceDevice : widestring;  hSelectedDisk : THandle;begin  hSelectedDisk := -1;  SourceDevice := '/dev/sde';   // Adjust accordingly! sde is a USB drive for me.  hSelectedDisk := FileOpen(SourceDevice, fmOpenRead);  if hSelectedDisk > -1 then Showmessage('Success') else ShowMessage('Failed');end; 

widestring really?


[0] Message Index

[#] Next page

[*] Previous page

Go to full version