GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Rich Felker (dalias@hachyderm.io)'s status on Saturday, 20-Dec-2025 23:01:24 JST Rich Felker Rich Felker

    Linux lazyweb, is there a way to detect from software the eject button on an optical drive being pressed while the drive is locked?

    In conversation about 2 months ago from hachyderm.io permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Saturday, 20-Dec-2025 23:26:50 JST Rich Felker Rich Felker
      in reply to
      • webhat

      @webhat That's basically what I'm asking. I suppose /sys would be the place to look. The intended use is to listen on it and convert presses into an unmount followed by eject command if the unmount succeeds, altho of course you could do anything else with it too.

      In conversation about 2 months ago permalink
    • Embed this notice
      webhat (webhat@infosec.exchange)'s status on Saturday, 20-Dec-2025 23:26:51 JST webhat webhat
      in reply to

      @dalias does the driver expose this in /sys that you could poll from software or can you query it from a syscall?

      In conversation about 2 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Saturday, 20-Dec-2025 23:59:42 JST Rich Felker Rich Felker
      in reply to
      • webhat

      @webhat There's an events virtual file that lists "eject_request" and "media_change" and an events_async virtual file that's probably somehow pollable for events...

      In conversation about 2 months ago permalink
    • Embed this notice
      webhat (webhat@infosec.exchange)'s status on Saturday, 20-Dec-2025 23:59:43 JST webhat webhat
      in reply to

      @dalias I'd probably dig through the driver to see what it exposes

      In conversation about 2 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Sunday, 21-Dec-2025 00:48:54 JST Rich Felker Rich Felker
      in reply to

      Hmm, maybe this isn't even needed..? The modern Linux iso9660 fs driver seems to ignore whether media is even present and responds to media change events so that a single mount "just works" across multiple media changes.

      I'd actually kinda like to disable that though, because it makes it so you have to just keep guessing when the new media is ready rather than knowing it's ready when the mount command returns.

      In conversation about 2 months ago permalink
      Haelwenn /элвэн/ :triskell: likes this.
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Sunday, 21-Dec-2025 00:57:24 JST Rich Felker Rich Felker
      in reply to

      I think I'd like this feature more if there were separate events for "drawer closed" and "media change completed" and the fs driver could make all accesses stall between these events rather than showing an empty fs during that window.

      In conversation about 2 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Sunday, 21-Dec-2025 01:32:14 JST Rich Felker Rich Felker
      in reply to
      • Adrian Chadd <verified.png>

      @erikarn Panicking must have been extremely old behavior, probably from the 1990s. In the early 00s I regularly force-removed media and sometimes even *drives* (unplugging IDE cables) to reset optical drives that were stuck, without crashing.

      The change described above in this thread was not about fixing panics.

      In conversation about 2 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Sunday, 21-Dec-2025 01:32:15 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to

      @dalias The irony is that the OLD behaviour in freebsd/linux is (a) the eject button was disabled / locked out whilst the media was mounted, and (b) mount did block until it was mounted.

      (and of course if the media went away on a mounted filesystem the kernel would typically panic cause noone wrote code that handled that case well, so I do get the UX behind that change, but I would've made the FS more robust..)

      In conversation about 2 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Sunday, 21-Dec-2025 01:47:03 JST Rich Felker Rich Felker
      in reply to
      • Adrian Chadd <verified.png>

      @erikarn Do you know if there's any option to force the old behavior?

      In conversation about 2 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Sunday, 21-Dec-2025 01:47:05 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to

      @dalias it was still in early 00s in freebsd, they did mostly fix it in linux by then!

      i remember when the UX changed to match what windows did and I also disliked it then, heh.

      In conversation about 2 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Sunday, 21-Dec-2025 02:01:20 JST Rich Felker Rich Felker
      in reply to
      • Adrian Chadd <verified.png>

      @erikarn I know it can lock the button. What I'm trying to find out is if, when locked, the button event can still be seen by software, so that I can script a custom response to it.

      In conversation about 2 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Sunday, 21-Dec-2025 02:01:21 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to

      @dalias A quck bit of googling shows the 'eject' command has some button control

      https://www.man7.org/linux/man-pages/man1/eject.1.html

      maybe see if that does lock the drive against button press -> eject? And at least then we know all the software bits are there?

      In conversation about 2 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.