> > + last_index = suspend_stats.last_failed + REC_FAILED_DEV_NUM - 1; > > + last_index %= REC_FAILED_DEV_NUM; > > + s += sprintf(s, "%s: %d\n%s: %d\n%s: %d\n%s: %d\n" > > + "%s: %d\n%s: %d\n%s: %d\n%s: %d\n", > > + "success", suspend_stats.success, > > + "fail", suspend_stats.fail, > > + "failed_freeze", suspend_stats.failed_freeze, > > + "failed_prepare", suspend_stats.failed_prepare, > > + "failed_suspend", suspend_stats.failed_suspend, > > + "failed_suspend_noirq", > > + suspend_stats.failed_suspend_noirq, > > + "failed_resume", suspend_stats.failed_resume, > > + "failed_resume_noirq", > > + suspend_stats.failed_resume_noirq); > > + s += sprintf(s, "failed_devs:\n last_failed:\t%s\n", > > + suspend_stats.failed_devs[last_index]); > > + for (i = 1; i < REC_FAILED_DEV_NUM; i++) { > > + index = last_index + REC_FAILED_DEV_NUM - i; > > + index %= REC_FAILED_DEV_NUM; > > + s += sprintf(s, "\t\t%s\n", > > + suspend_stats.failed_devs[index]); > > + } > > And, to top it all of, this is NOT allowed in sysfs at all. > > Remember, sysfs is one text field per file. Not something huge like > this. > > Perhaps you should use debugfs instead? Or perhaps dmesg. NAK. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm