MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / adfDevType

Function adfDevType

dep/adflib/src/adf_hd.c:54–69  ·  view source on GitHub ↗

* adfDevType * * returns the type of a device * only based of the field 'dev->size' */

Source from the content-addressed store, hash-verified

52 * only based of the field 'dev->size'
53 */
54int adfDevType(struct Device* dev)
55{
56 if( (dev->size==512*11*2*80) || /* BV */
57 (dev->size==512*11*2*81) || /* BV */
58 (dev->size==512*11*2*82) || /* BV */
59 (dev->size==512*11*2*83) ) /* BV */
60 return(DEVTYPE_FLOPDD);
61 else if (dev->size==512*22*2*80)
62 return(DEVTYPE_FLOPHD);
63 else if (dev->size>512*22*2*80)
64 return(DEVTYPE_HARDDISK);
65 else {
66 (*adfEnv.eFct)("adfDevType : unknown device type");
67 return(-1);
68 }
69}
70
71
72/*

Callers 1

adfMountDevFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected