FU Logo
  • Startseite
  • Kontakt
  • Impressum
  • Home
  • Listenauswahl
  • Anleitungen

[linux-minidisc] introduce recorder/filesystem concept split; move autodetection to libhimd

<-- thread -->
<-- date -->
  • From: Michael Karcher <Michael.Karcher@fu-berlin.de>
  • To: linux-minidisc@lists.fu-berlin.de
  • Date: Sun, 28 Nov 2010 00:38:05 +0100
  • Subject: [linux-minidisc] introduce recorder/filesystem concept split; move autodetection to libhimd

Hello co-developers,

when trying to implement auto-detection of hot-plugged MD recorders on
Linux (which I have a working proof-of-concept for), I stumbled upon the
problem, that the current code (which is used only on Windows) that was
trying to abstract from Windows, contains the assumption that an
attached Hi-MD recorder has a fixed path. This is true in Windows, as
that path is the drive letter assigned to the device - but this concept
breaks down in Linux.

A recorder has a device node in Linux (like /dev/sdb), while the file
system on a medium that is inserted might have a mount point. This mount
point is very likely to be different for different media, as the mount
point is derived from the volume label or FAT volume ID on common
distributions. So for opening files using the kernel file system, we
need the mount point, for sending SCSI commands OTOH, we need the device
name, so we should have the distinction somehere.

My suggestion is to have a two-tier system - recorders and media. First
we detect recorders, that have (at least) the following properties:
 - physical path (/dev/sdb on Linux, either E:\ or \\.\PHYSICALDRIVE3 on
Windows, whatever we need for libscg.)
 - device name ("Sony MZ-RH1")
 - pointer to a medium structure (is NULL if no medium inserted).

And the medium structure has (at least) the following properties:
 - mounted path (e.g. "/media/disk_" on Linux, or E:\ on Windows)
 - pointer to recorder structure (is NULL if a Hi-MD copy is opened).

As we see, there is no 1:1 relationship between these two structures,
that's why I suggest the split of these info. What do you think?
Furthermore, I suggest moving the himd detection stuff to libhimd, to
prepare SCSI support integration (which needs to deal with physical
devices) in libhimd.

Regards,
  Michael Karcher




<-- thread -->
<-- date -->
  • linux-minidisc - November 2010 - Archives indexes sorted by:
    [ thread ] [ subject ] [ author ] [ date ]
  • Complete archive of the linux-minidisc mailing list
  • More info on this list...

Hilfe

  • FAQ
  • Dienstbeschreibung
  • ZEDAT Beratung
  • postmaster@lists.fu-berlin.de

Service-Navigation

  • Startseite
  • Listenauswahl

Einrichtung Mailingliste

  • ZEDAT-Portal
  • Mailinglisten Portal