?
Solved

Copy Protection using Serial Numbers (SCSI Disk / Processor / BIOS / Mainboard)

Posted on 2003-03-17
7
Medium Priority
?
225 Views
Last Modified: 2010-04-15
#/sbin/hdparm -i /dev/hda
Provides information on Hard Disk Drive /dev/hda including the serial number.

Does anyone have any idea of getting those serial numbers using C?

I did put the question earlier at :
http://www.experts-exchange.com/Operating_Systems/Linux/Linux_Administration/Q_20554316.html
0
Comment
Question by:zahidbd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 20

Expert Comment

by:jmcg
ID: 8157637
[Customers hate the idea that if a piece of hardware breaks and must be replaced it also causes random pieces of software to stop working.]

You could do what hdparm does. The current version reads

/proc/ide/hda/identify

and finds the serial number in the 20 bytes starting at byte offset 20. Or get the hdparm source code and look at the file identify.c that's included.
0
 

Author Comment

by:zahidbd
ID: 8157856
>>[Customers hate the idea that if a piece of hardware breaks and must be replaced it also causes random pieces of software to stop working.]

But no other better way. I can try with IP/domain. Actually my application is related to Internet. So, it's not that tough to create a nice/simple interface to support and remove the customers problem to reinstall.

Thanks for your comments. I did not see any file
proc/scsi/sda/identify
Anyway.. I will check for the file identify.c

0
 
LVL 20

Expert Comment

by:jmcg
ID: 8159316
I don't have any systems with SCSI disks to check on what the equivalent would be, sorry.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:samri
ID: 8165941
hi zahidbd,

I'm not a programmer.  But looking at your requirement, maybe you might want to look at the standard header file in (if you could use that in your code).

/usr/include/linux/genhd.h

cheers.
0
 

Author Comment

by:zahidbd
ID: 8185385
hello, samri
/usr/include/linux/genhd.h is not talking anything about scsi. "Generic hard disk header file"
Thanks anyway again.
0
 
LVL 20

Expert Comment

by:jmcg
ID: 10144602
Nothing has happened on this question in more than 9 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
PAQ, refund points (responses worth keeping even though asker not satisfied).

[I posted the same recommendation in the cross-referenced question http:Q_20554316.html
which had already been visited by CleanupPing.]

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 10205787
PAQed, with points refunded (20)

Computer101
E-E Admin
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question