Changes between Version 1 and Version 2 of DeveloperHowToMigrate
- Timestamp:
- Aug 19, 2009, 9:54:08 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperHowToMigrate
v1 v2 10 10 #!sh 11 11 $ cat dev_legacy.cpp >> os_youros.cpp 12 [[code]] 13 - Re-configure, this should now detect new interface: 14 [[code format="bash"]] 12 }}} 13 * Re-configure, this should now detect new interface: 14 {{{ 15 #!sh 15 16 $ ./configure 16 17 ... … … 55 56 { 56 57 ... 57 m_fd = open(get_dev_name(), ...);58 m_fd = ::open(get_dev_name(), ...); 58 59 if (m_fd < 0) { 59 60 set_err(errno); … … 104 105 * Remove special handling for SMART STATUS, return result registers in 'out.out_regs' if requested by 'in.out_needed.is_set()'. 105 106 * Adjust returns: 106 {{{ 107 Replace 'return 0;' by 'return true;'. 108 Replace 'errno = ERR; return -1;' by 'return set_err(ERR, "optional message", ...)'. 109 }}} 107 * Replace 'return 0;' by 'return true;'. 108 * Replace 'errno = ERR; return -1;' by 'return set_err(ERR, "optional message", ...)'. 110 109 * Optional add 48bit ATA pass through support: 111 {{{ 112 If 'in.in_regs.is_48bit_cmd()' is set, 113 pass low (in.in_regs.lba_mid) and 114 high (in.in_regs.prev.lba_mid) byte of each register to ioctl. 115 }}} 110 * If 'in.in_regs.is_48bit_cmd()' is set, pass low (in.in_regs.lba_mid) and high (in.in_regs.prev.lba_mid) byte of each register to ioctl. 116 111 117 112 === Later === … … 121 116 122 117 === Example for Steps 1+2: === 123 http://smartmontools.cvs.sourceforge.net/viewvc/smartmontools/sm5/os_linux.cpp?r1=1.116&r2=1.117 118 See changeset r2623 124 119 125 120 === Example for Step 3 (3ware only): === 126 http://smartmontools.cvs.sourceforge.net/viewvc/smartmontools/sm5/os_linux.cpp?r1=1.117&r2=1.118 121 See changeset r2624