trunk/src/mess/tools/imgtool/modules/amiga.c
r32498 | r32499 | |
1765 | 1765 | { |
1766 | 1766 | imgtoolerr_t ret; |
1767 | 1767 | root_block root; |
| 1768 | char info[255]; |
| 1769 | time_t t_c, t_v, t_r; |
| 1770 | char c[19], v[19], r[19]; |
1768 | 1771 | |
1769 | 1772 | ret = read_root_block(img, &root); |
1770 | 1773 | if (ret) return; |
1771 | 1774 | |
1772 | | memcpy(string, root.diskname, MIN(root.name_len, len)); |
1773 | | string[MIN(root.name_len, len)] = '\0'; |
| 1775 | t_c = amiga_crack_time(&root.c); |
| 1776 | t_v = amiga_crack_time(&root.v); |
| 1777 | t_r = amiga_crack_time(&root.r); |
| 1778 | |
| 1779 | strftime(c, sizeof(c), "%d-%b-%y %H:%M:%S", localtime(&t_c)); |
| 1780 | strftime(v, sizeof(v), "%d-%b-%y %H:%M:%S", localtime(&t_v)); |
| 1781 | strftime(r, sizeof(r), "%d-%b-%y %H:%M:%S", localtime(&t_r)); |
| 1782 | |
| 1783 | strcpy(info, "Volume name: "); |
| 1784 | strncat(info, (char *)root.diskname, root.name_len); |
| 1785 | strcat(info, "\nVolume created: "); |
| 1786 | strcat(info, c); |
| 1787 | strcat(info, "\nVolume modified: "); |
| 1788 | strcat(info, v); |
| 1789 | strcat(info, "\n Root modified: "); |
| 1790 | strcat(info, r); |
| 1791 | |
| 1792 | strncpy(string, info, len); |
1774 | 1793 | } |
1775 | 1794 | |
1776 | 1795 | |