- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to get the status like mt status with mtio in ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2003 08:01 AM
11-06-2003 08:01 AM
how to get the status like mt status with mtio in C
I saw ioctl and the use of the structure mtget to get the status of the tape, but when i check the struct member mt_dsreg it's always 0
whether the tape is online or offline.
Now, i don't know if the status that i refer to is the same as the one used in the mt_dsreg field. I probably assumed incorrectly that they
were Does anyone know what is meant by status in this struct ? Are there any other functions or structs i can use for this or is there
something else i need to do with mtget.mt_dsreg ? Many thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2003 03:19 PM
11-06-2003 03:19 PM
Re: how to get the status like mt status with mtio in C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2003 07:07 PM
11-06-2003 07:07 PM
Re: how to get the status like mt status with mtio in C
got the gnu mt source from gun paxutils-2.4
I am listing the print_status function.
print_status (char *dev, int desc)
{
struct mtget status;
if (rmtioctl (desc, MTIOCGET, (char *) &status))
error (2, errno, "%s", dev);
printf (_("drive type = %d\n"), (int) status.mt_type);
#if defined(hpux) || defined(__hpux__)
printf (_("drive status (high) = %d\n"), (int) status.mt_dsreg1);
printf (_("drive status (low) = %d\n"), (int) status.mt_dsreg2);
#else
printf (_("drive status = %d\n"), (int) status.mt_dsreg);
#endif
printf (_("sense key error = %d\n"), (int) status.mt_erreg);
printf (_("residue count = %d\n"), (int) status.mt_resid);
#if !defined(ultrix) && !defined(__ultrix__) && !defined(hpux) && !defined(__hpp
ux) && !defined(__osf__)
printf (_("file number = %d\n"), (int) status.mt_fileno);
printf (_("block number = %d\n"), (int) status.mt_blkno);
#endif
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2003 11:56 PM
11-06-2003 11:56 PM
Re: how to get the status like mt status with mtio in C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2003 03:22 AM
11-07-2003 03:22 AM
Re: how to get the status like mt status with mtio in C
Thanks, but i am getting the same result i was getting with my sample code. The mt_dsreg value is always 0, in fact i had tried this before with the mtget struct and i get 0s. Only the drive type gives a number: 52. Thanks for the try i will have to hunt down the sample code for mt if available.