From: Ajay <a_ajay_sr@yahoo.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Hotplugging USB Compact flash reader
Date: Sat, 10 Aug 2002 04:58:19 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-102895557730816@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-102886829118655@msgid-missing>
I figured out enough of usb.agent to be able to trace
it to a point where I found that the handbook and the
userbook do not have a match for the VID-PID for the
reader that I'm using (it's an SCM ORCA cf-ms-sm-sd
reader). However I found that it loads (binds?) the
correct drivers. So in the "add" event I simply added
"mount /dev/sda /mnt/cf" and in the "remove" event I
unmounted it. All this is in usb.agent.
In Gnome this works fine - an icon comes to the
desktop without me having to do anything else. In KDE,
there is no icon, but the device is mounted.
My question is:
1. Is it correct to modify usb.agent itself? Should I
rather include the VID-PID and other details in
the handbook/userbook?
2. What is the "match-flag"?? AFAI can see it seems to
be a "mask flag" - something to be 'anded' with
something else. What is the principle behind it?
3. This is premature, but could someone give me a hint
as to which desktop agent I should be talking to?
Thanks and regards,
Ajay.
--- David Brownell <david-b@pacbell.net> wrote: >
Ajay wrote:
> > HI,
> > I am a first timer in this groups.
> > I am trying to develop something that can
> recognize
> > when a USB Flash card reader is plugged in, when a
> > media is plugged into the reader, and when either
> of
> > them are removed. Something like plug and play -
> just
> > plug in and an icon appears on the desktop which
> takes
> > you to the diectory. I guess hotplugging should
> have
> > the answer.
>
> You're asking about a missing piece, or maybe a
> couple.
>
> - "disk level" hotplug events, reporting new storage
> so that it can be mounted. in 2.5 it seems like
> at least the "scsi hotplug" may really happen,
> which
> should solve your USB cardreader issue.
>
> - hotplug events talking to X11 desktops
>
> UNIX desktops traditionally "knew" that only a few
> devices
> might ever get new media, and polled things like
> diskette
> and cdrom devices from some desktop monitoring
> program.
> (Maybe not the same one polling for filesystem
> changes.)
>
> Of Linux today, such devices can connect
> dynamically, so
> any "poll only these devices" architecture just
> loses.
>
> One of the KDE or GNOME object model hooks ought to
> do
> nicely to let some hotplug agent talk to some
> service
> running inside the desktop, reusing infrastructure
> that'd
> otherwise need to be reinvented for a "raw X11"
> solution.
>
>
> > I read as much as I could but I can't figure out
> where
> > /sbin/hotplug and usb.agent fit in. How do I trap
> the
> > hotplug notification? Do I have to "register"? How
> do
> > I do that?
>
> Considering that you'd need to design some of the
> hotplug
> events needed to address this problem, you'll need
> to
> understand enough to create those answers yourself
> ... or
> wait for someone else to address them! :)
>
> The core observation will be that the hotplug agent
> for
> some TBD "storage hotplug event" would need to
> invoke some
> program that's permitted to talk to the relevant
> desktop
> service, which would pop up your desktop icon.
>
> - Dave
>
>
>
>
-------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Linux-hotplug-devel mailing list
> http://linux-hotplug.sourceforge.net
> Linux-hotplug-devel@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
=="The worst thing one can do is not to try, to be aware of what one wants and not give in to it, to spend years in silent hurt wondering if something could have materialized -- and never knowing."
- David Viscott
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2002-08-10 4:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-09 4:40 Hotplugging USB Compact flash reader Ajay
2002-08-10 4:58 ` Ajay [this message]
2002-08-10 19:49 ` David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-hotplug-102895557730816@msgid-missing \
--to=a_ajay_sr@yahoo.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).